Re: Go 2017 Survey Results

2018-02-27 Thread bachmeier via Digitalmars-d

On Tuesday, 27 February 2018 at 15:30:44 UTC, JN wrote:

I'm no expert on programming language design, but I think there 
is a difference between templates and generics. At the basic 
level they are used for similar things - specializing container 
types, etc. But templates usually allow much more, so they end 
up being layers of layers of compile time code, e.g. D and 
Boost, which while nifty has it's compilation time cost.


I agree. But I don't know of any way to add generics without 
slowing compilation or making the language harder to use, even if 
it's something other than templates.


Re: Go 2017 Survey Results

2018-02-27 Thread Ola Fosheim Grøstad via Digitalmars-d

On Tuesday, 27 February 2018 at 15:30:44 UTC, JN wrote:
I'm no expert on programming language design, but I think there 
is a difference between templates and generics. At the basic 
level they are used for similar things - specializing container 
types, etc. But templates usually allow much more, so they end 
up being layers of layers of compile time code, e.g. D and 
Boost, which while nifty has it's compilation time cost.


Generic programming just means that you leave out the 
specification for some types in the code for later.


C++-style templates like D has is one solution to generic 
programming.  When some people write «generics» they probably 
think of Java and something that is like that...




Re: Go 2017 Survey Results

2018-02-27 Thread JN via Digitalmars-d

On Tuesday, 27 February 2018 at 15:01:45 UTC, bachmeier wrote:
It's also something that they've kept out of the language by 
design. I don't disagree with that decision either. If the 
selling points are fast compilation and code that is simple to 
write and read without much knowledge of the language, it's 
hard to see how generics fit in. Look at D. Templates slow 
compilation and having a standard library that emphasizes 
generic code makes it much harder to learn.


I'm no expert on programming language design, but I think there 
is a difference between templates and generics. At the basic 
level they are used for similar things - specializing container 
types, etc. But templates usually allow much more, so they end up 
being layers of layers of compile time code, e.g. D and Boost, 
which while nifty has it's compilation time cost.


Re: Go 2017 Survey Results

2018-02-27 Thread bachmeier via Digitalmars-d

On Monday, 26 February 2018 at 21:37:40 UTC, H. S. Teoh wrote:
On Mon, Feb 26, 2018 at 09:04:20PM +, Ali via Digitalmars-d 
wrote: [...]

2) generic programming is important

[...]

It's something sorely lacking in Go, so it's not unsurprising 
it's a big item on the list.



T


It's also something that they've kept out of the language by 
design. I don't disagree with that decision either. If the 
selling points are fast compilation and code that is simple to 
write and read without much knowledge of the language, it's hard 
to see how generics fit in. Look at D. Templates slow compilation 
and having a standard library that emphasizes generic code makes 
it much harder to learn.


Re: Go 2017 Survey Results

2018-02-26 Thread jmh530 via Digitalmars-d

On Monday, 26 February 2018 at 21:04:20 UTC, Ali wrote:

This link was posted today on hacker news (ycombinator)
https://blog.golang.org/survey2017-results
https://news.ycombinator.com/item?id=16468358

My biggest takes from this are
1) people are looking for python alternatives, probably more so 
than c alternatives

2) generic programming is important


Or why I learned D.


Re: Go 2017 Survey Results

2018-02-26 Thread H. S. Teoh via Digitalmars-d
On Mon, Feb 26, 2018 at 09:04:20PM +, Ali via Digitalmars-d wrote:
[...]
> 2) generic programming is important
[...]

It's something sorely lacking in Go, so it's not unsurprising it's a big
item on the list.


T

-- 
BREAKFAST.COM halted...Cereal Port Not Responding. -- YHL


Re: Go 2017 Survey Results

2018-02-26 Thread Russel Winder via Digitalmars-d
On Mon, 2018-02-26 at 21:04 +, Ali via Digitalmars-d wrote:
> This link was posted today on hacker news (ycombinator)
> https://blog.golang.org/survey2017-results
> https://news.ycombinator.com/item?id=16468358
> 
> My biggest takes from this are
> 1) people are looking for python alternatives, probably more so 
> than c alternatives

People choosing to complete a Go-oriented survey are…
 
> 2) generic programming is important
> 
> As I understand the results of this survey, will be use to guide 
> Go's development
> this is in my opinion very inclusive and transparent

I can't imagine Go getting templates anytime soon.

-- 
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk


signature.asc
Description: This is a digitally signed message part


Go 2017 Survey Results

2018-02-26 Thread Ali via Digitalmars-d

This link was posted today on hacker news (ycombinator)
https://blog.golang.org/survey2017-results
https://news.ycombinator.com/item?id=16468358

My biggest takes from this are
1) people are looking for python alternatives, probably more so 
than c alternatives

2) generic programming is important

As I understand the results of this survey, will be use to guide 
Go's development

this is in my opinion very inclusive and transparent