Language Poll II
This is the second poll about various stuff in the Nemerle language. Please take a minute or two to fill it.
Cross analysis on QN: 4
|
1.
Which of the following features would you like to be added first to
Nemerle. You can mark more than one, but the less you mark, the more
important they are :-)
The numbers are issues numbers in our issue tracking system.
If you use the Other... line, you can report the issue to our system
and include number. You can also give some more description in the
comments section.
The [hard] marks are only for reference.
| #416 allow extending existing classes [hard] |
  46.4% |
(13) |
| #316 Allow PInvoke methods |
  39.3% |
(11) |
| #142 default parameters |
  25.0% |
(7) |
| #138 matching on properties |
  42.9% |
(12) |
| #409 Omitting the prefix when matching variants |
  28.6% |
(8) |
| #178 Add [method: Pure] and [assembly: Pure] attributes [hard] |
  7.1% |
(2) |
| #180 null-checks when fireing events |
  17.9% |
(5) |
| #303 indexing operator on tuples |
  46.4% |
(13) |
| #181 safe casts to enum types |
  21.4% |
(6) |
| #213 Type inference for private methods [hard] |
  21.4% |
(6) |
| Other: chained asignation: a=b=1; |
  3.6% |
(1) |
|
2.
Do you think the following expression should give an ambiguity error?
using SomeOther;
class Buffer { public this () { ... } }
class SomeOther { public static Buffer () : void { ... } }
{
...
Buffer ();
...
}
Buffer() is valid as a function SomeOther.Buffer() call or as creation (and ignoring) of an instance of Buffer.
On the other hand, compiler could just choose the function returning void, because this is what
is expected in the middle of the sequence.
| It should be an ambiguity error |
  71.4% |
(20) |
| It should select the void-returning function |
  17.9% |
(5) |
| TOTAL |
  89.3% |
28 |
|
|
3.
Would you like to have return and break statements in Nemerle? They are against functional style, but sometimes seems cleaner, especially
since we have a handful of imperative loops already (while,
for, foreach).
The statements are most likely to be implemented as macros
inside the Nemerle.Imperative (or just Nemerle.Ugly ;-)
namespace, so using Nemerle.Ugly; will be needed to use them.
Note that we are not going to add general goto support. However the break statement is
going to support label to facilitate jumping out of a nested loop.
| Yes, yes, yes! They should be available by default, without any using! |
  25.0% |
(7) |
| Yes, this is good idea, but not by default, please. |
  21.4% |
(6) |
| Well... I don't like it, but if you have to -- put it in a namespace. |
  35.7% |
(10) |
| No, there is no place for this stuff in Nemerle! |
  17.9% |
(5) |
| TOTAL |
  100.0% |
28 |
|
|
4.
It is sometimes necessary to specify type arguments of a method upon call.
For example: SomeFun[int] () -- here the type argument cannot be
inferred, and therefore has to be specified. It is hardly ever used, because
our inference engine is quite smart.
The most likely place where it can be needed are type constructors, like
def x = Dictionary[int,string]().
Now the problem is syntactic. We cannot use the syntax above, because
we cannot distinguish it from indexer reference at the syntactic level.
We also don't want to use C#-ish SomeFun<int> (),
for some other parser-related reasons.
Which syntax should we choose? We are not happy with any of the possibilities
listed here, so feel free to add your own.
| Foo.[int,string] (note the dot after Foo) |
  35.7% |
(10) |
| Foo [of int, string] |
  14.3% |
(4) |
| Foo [with int, string] |
  10.7% |
(3) |
| SomeType [of int, string], SomeFun [with int, string] |
|
(0) |
| Other: Dictionary() of [int,string] |
  3.6% |
(1) |
| Other: Don't know, but the proposed ones are ugly. The first is sightly less ugly. |
  3.6% |
(1) |
| Other: Foo () : Foo [int * string] |
  3.6% |
(1) |
| Other: Foo<int, string> |
  3.6% |
(1) |
| Other: Foo[_ : int, _ : string] |
  3.6% |
(1) |
| Other: No punctuation at all other than whitespace. Just use SomeFun int (). Same for other type arguments too. |
  3.6% |
(1) |
| Other: no syntax force the user to explicit types of the arguments SomeFun(a :int, b :string) |
  3.6% |
(1) |
| Other: SomeType(int, string)(), SomeFun(int)() |
  3.6% |
(1) |
| Other: [int, string] Foo or For [= int, string] |
  3.6% |
(1) |
| TOTAL |
  92.9% |
28 |
|
5.
How well do you know Nemerle?
| Very well |
  28.6% |
(8) |
| Quite well, wrote bigger example |
  21.4% |
(6) |
| Wrote small example |
  50.0% |
(14) |
| Read some docs |
|
(0) |
| This is the first thing about Nemerle I've ever seen |
|
(0) |
| TOTAL |
  100.0% |
28 |
|
6.
Comments, you may also include email contact if desired:
| # | Response |
| 1 | -- Kamil Skalski |
| 1 | --Michal Moskal |
| 1 | :* |
| 1 | :-) |
| 1 | brandonbarker(a)ieee.org |
| 1 | Foo<int>
really would be the nicest, so you should at least have explained on
the survey the "other parser-related reasons" so possible work-arounds
can be discussed. |
| 1 | For the type parameter ambiguity, would a "new" keyword solve the problem with constructors?
def x = new Dictionary[String,int]()
cakoose(a)yahoo.com |
| 1 | Good job guys, nemerle is a great language. |
| 1 | I would
also like to see more documentation on using the advanced features of
macros -- particularly modifying and generating classes. |
| 1 | Nemerle is great already, keep it up! |
| 1 | On #2, I
don't understand how you could know that the function returning void is
what is expected in the middle of the sequence. What if the function
returned string or worse yet a Buffer object?
On #4, Why is any punctuation other than white space needed for type
arguments? Rather than Hashtable [int, string] why not just Hashtable
int string? Or more complicated: Hashtable int List string instead of
Hashtable [int, List [string] ]. |
| 1 | The features I'd like incorporated:
* Laziness + memoization
* Haskell-like [x | x <- xs, x <y]
* Haskell-like [1..10], [a..z] and such |
|
|