[nem-en] Increment and decrement operators
d
d at hell.art.pl
Sun Feb 26 21:30:35 CET 2006
On Feb 26, 2006, at 12:01 PM, Philippe Quesnel wrote:
> On 2/26/06, Kamil Skalski < kamil.skalski at gmail.com> wrote:
> To make it clear: I'm thinking about adding new operators '+++' and
> '---', which would return values.
IMO a bad idea. Not when writing code, but when reading somebody
else's.
Confusing, not very intuitive blablabla..
> On the other hand, having ++ behave as expected by many would be very
> nice - maybe we should have a special case for ++ and -- so that they
> will return void in general, but if expected some value, they will
> return it...
Now that's an interesting concept :-d Really. Actually I'd say
that's a nice
philosophy overall. Making some syntactic constructs mean what the
programmer *wants* them to mean, guessing from context (perhaps
combined with compiler hints in some cases).
That would apply to ++ vs +++, [] vs .[], [foo | bar] vs $[foo |
bar] and probably
many more.
I still like SML the most out of all languages for situations where
I don't need
extensive libraries mainly because it's very small and concise, with
very few
things to remember. Hardly any other language allows to write code
that's
totally clean/clear and understandable *AND* as (or even more) concise,
as the specifications for the algorithms being implemented. THAT'S
what I
call a *good* language.
Obviously achieving that in Nemerle is not as simple for many
reasons (the
OO/imperative/functional mix + C#/.NET compatibility demand more
syntactic
constructs), but that doesn't mean the idea of keeping it small and
clean
should be abandoned. Applying this "intelligent guessing" philosophy
would
be a big step in the right direction IMO.
Of course it would take an additional effort on the side of ncc
developers, but
I think now is the time to do it (if ever), since 1.0 is nearing and
major changes
after that are not planned AFAIR..
d
More information about the devel-en
mailing list