News for hackers. Stuff that matters.
Re:I missed Nim (2014) by Symmetry on Thursday January 21, 2016 @04:39PM (#10948606)
Rust with a more Nimish syntax would be good but what I really think I want for day to day use is Nim/Go

Nim's syntax regarding whitespace. It's easy const/let/var, if/when, and hopefully eventually proc/func distinctions. It's unified function call syntax. It's optional garbage collector. Sized arrays.

Go's handling of accessors for structures inside structures and structural typing.

But I would like to add Rust's use of '!' for macros and Python's slicing syntax.

Re:I missed Nim (2014) by dom96 on Thursday January 21, 2016 @05:39PM (#10949074)
> Go's handling of accessors for structures inside structures and structural typing.

Could you give an example of this?

> But I would like to add Rust's use of '!' for macros and Python's slicing syntax.

Have you seen the Nim `a[x .. ^1]` syntax?

Re:I missed Nim (2014) by Symmetry on Thursday January 21, 2016 @05:46PM (#10949128)
It's been a while since I've used Go but I seem to recall that you can say foo.baz instead of foo.bar.baz if baz is a unique name in that struct hierarchy. Which makes choosing composition over inheritance nicer. For the structural typing thing that just means that you declare interfaces that functions can accept and any struct that can fulfill that interface does. Sort of like static duck typing but all the used methods are checked at compile time. But more generally I'm not a fan of using inheritance as a way of achieving polymorphism and I like Go's approach here more than Nim's.

No, I hadn't seen the 'a[x .. ^1]' syntax. Does that mean 'The items of a from x to the second from the last'? If so I'm glad that the semantics are there but Python's syntax is still nicer.

Re:I missed Nim (2014) by dom96 on Friday January 22, 2016 @05:40AM (#10951960)
Have you seen Nim's concepts? [1] They sound similar to what you're describing.

The semantics are slightly different from Python. 'a[x .. ^1]' means 'The items of a from x to the last element'

Re:I missed Nim (2014) by dom96 on Saturday January 23, 2016 @07:01AM (#10958104)
Oops, forgot to include link to concepts: http://nim-lang.org/docs/manual.html#generics-concepts
Re:I missed Nim (2014) by Symmetry on Saturday January 23, 2016 @09:44AM (#10958524)
And if Nim replaces inheritance with concepts and composition I'd be quite happy. But I think they'll end up existing side by side and most things will use inheritance based polymorphism.