[nem-en] loving Nemerle
Niki Estner
n.estner at gmx.de
Thu Oct 27 12:43:52 CEST 2005
> -----Original Message-----
> From: devel-en-bounces at nemerle.org [mailto:devel-en-bounces at nemerle.org]
> On Behalf Of Sean L. Palmer
> Sent: Thursday, October 27, 2005 6:31 AM
> To: devel-en at nemerle.org
> Subject: Re: [nem-en] loving Nemerle
>
>
> >>Great job, keep it up, and I very much look forward to trying out the
> >>indentation-based syntax in a future release. And are there plans to
> >>infer types of private class methods? (cuz i'll gladly test-drive
> >>that too :)
> >>
> >>
> >
> >Thanks! I'm also curious if people will find the indentation syntax
> >useful in Nemerle.
> >Some already tried: http://d.hatena.ne.jp/akiramei/20051020#p1
> >Indeed, language have a different feel this way, though I would be a
> >little bit scary about whitespaces ruling semantics of my program...
> >We are planning a new release soon and this feature will be there for
> everybody.
> >
> >
> I thought about this recently and it seems to be more of an IDE display
> and UI issue than anything.
>
> Think about it, why can the IDE not take code like this:
>
> foo { bar { baz } } bam
>
> and display it to you as you edit, like this:
>
> foo
> bar
> baz
> bam
>
> but you can configure the indentation level. Or if you really like the
> brackets, like this:
>
> foo {
> bar {
> baz
> }
> }
> bam
Just a little note from a "working-class programmer": It can be quite
annoying to maintain code that was written by people with different
indention styles (opening brace on the same line, tabs vs. spaces etc.).
Having a compiler that would actually accept both of the code samples above
as equivalent... well, let's just say I wouldn't want to maintain code
written in that language. Smart IDEs reduce the problem, but sometimes
they're simply not smart enough. IMHO it would be better if the compiler (at
least optionally) would enforce correct indention _and_ bracing.
Suggestion: Function bodes, namespace, class and property definitions must
always have braces+indention, in all the other places it's optional, but if
you have braces, they must match the indention. If you don’t, you get an
error or a warning, depending on a compiler setting. How's that?
> Or in fact in any other way which you find easier to edit!
>
> When saving, it converts indentation back into brackets so that it will
> compile. In fact it could be implemented as a preprocessor that
> converts Nemerle embedded in HTML into raw text Nemerle. (then use a
> WYSIWYG HTML editor to write code.) I am not sure why people refuse to
> leave pure ascii text editors behind in the dustbin of history.
> Similarly, why do people still hate HTML email?
>
> >Yes, the inference on global level is a planned feature:
> >http://nemerle.org/bugs/view.php?id=213
> >And it is quite probable that Michal will implement it sooner or
> >later, as this is a subtopic of his PhD studies.
> >
> That will be wonderful.
>
> Keep up the good work guys. I hope to have time to play more with
> Nemerle soon.
Me too!!!
Niki
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.4/146 - Release Date: 21.10.2005
More information about the devel-en
mailing list