Live data from Hacker News

The Rewards of Creating a Programming Language

mikedrivendevelopment.blogspot.com

31–40 of 88 posts

Re: The Rewards of Creating a Programming Language

#31
post #26

Earlier quoted context omitted.

If you're looking to build something that people will actually use, you're better off not doing anything novel at all, but rather combining novel ideas that have shown promise in research languages into a package that people might actually want to use for everyday programming. There's a rule of thumb among language designers that your language should either focus on proving out one big language feature , or it should…

>Haskell introduced typeclasses. Go and Rust popularize them (as interfaces and traits, respectively, the latter also influenced by C++ STL's concepts). This is a really ironic thing to say considering Go doesn't have generics, rust doesn't have higher kinds, they don't support any sort of implicit (or global) way of using them as constraints.... are you sure you know what type classes are?

This may be true about Go, but Rust's traits were very similar to Haskell type classes and now are equivalent in power to Haskell's type classes with several extensions turned on (even though they lack HKTs).

As a side note although clunky HKTs are encodable in Rust and I plan on implementing them natively once we have landed a stable version of 1.0.

Re: The Rewards of Creating a Programming Language

#32
Inaccurately, programming language = syntax + semantics.

Do not waste your time on syntax, if you are going to create a new language, rather than a parser.

I'm not saying that syntax is not important. But I feel semantics deserves much more attention.

Re: The Rewards of Creating a Programming Language

#33
post #31
post #26

Earlier quoted context omitted.

>Haskell introduced typeclasses. Go and Rust popularize them (as interfaces and traits, respectively, the latter also influenced by C++ STL's concepts). This is a really ironic thing to say considering Go doesn't have generics, rust doesn't have higher kinds, they don't support any sort of implicit (or global) way of using them as constraints.... are you sure you know what type classes are?

This may be true about Go, but Rust's traits were very similar to Haskell type classes and now are equivalent in power to Haskell's type classes with several extensions turned on (even though they lack HKTs). As a side note although clunky HKTs are encodable in Rust and I plan on implementing them natively once we have landed a stable version of 1.0.

How do you enforce them as constraints on a method?

Re: The Rewards of Creating a Programming Language

#35
post #28
post #27

Earlier quoted context omitted.

This is excellent: I recently worked through this class (at my own pace: you can register for past offerings). I made things a little harder than necessary by eschewing the provided framework code and writing everything myself, in go. I found SPIM super-annoying, but managed to resist the temptation to build a better MIPS emulator. :-) Highly recommend: writing a (very simple) compiler is no longer a black-art-seemin…

Oh, http://github.com/zellyn/gocool : I recommend you steal my tests (bash, sorry!) but avoid cheating too much on the actual meat of the exercises :-)

Thank you for this; cloning it now

Re: The Rewards of Creating a Programming Language

#36

Earlier quoted context omitted.

no?

Can you explain how? Obviously at least two people either disagree or aren't privy to the knowledge you hold!

I suspect a reasonable person might expect you to explain how you came to the conclusion that a language with a smaller or comparative user base / popularity to Haskell "popularised" type classes.

Re: The Rewards of Creating a Programming Language

#37

Earlier quoted context omitted.

If you're looking to build something that people will actually use, you're better off not doing anything novel at all, but rather combining novel ideas that have shown promise in research languages into a package that people might actually want to use for everyday programming. There's a rule of thumb among language designers that your language should either focus on proving out one big language feature , or it should…

erlang's concurrency is actors, which is different from go's CSP. And I nearly spat out my tea when you said that Go popularized something Haskell did; and I haven't even had any tea today.

It's always worth pointing out that CSP is a language, rather than a concept. Perhaps "CSP-inspired" would be a better choice?

Re: The Rewards of Creating a Programming Language

#38

The author says he turned to Coursera, but doesn't mention the course(s) he took, but I'm going to guess it's the the 'Compilers' class from Stanford[0]. I've heard good things about the course and the lecturer (Alex Aiken) so I really wanted to take the course while it was being offered but was too busy last year. I hope they offer it again this year. https://www.coursera.org/course/compilers

I was able to only participate in a small amount of it, and came away with significant value in increased understanding.

Re: The Rewards of Creating a Programming Language

#39

Earlier quoted context omitted.

It’s not a novel idea, but Wake does it quite well. Most variable names aren’t that useful—they’re just one of many possible syntactic ways to plumb values around.

I've been playing around with an idea to replace variable names with brands. So say you have an argument to a procedure: brand position Position is a point, but is not a distinct type. You can document it centrally and not for each time it is used as an argument to a procedure or as a variable. E.g. def Set(position): ... You have define brands before you can define your procedure, but multiple procedures can share b…

So position is like a typedef that you can use without a name, because it is self-naming.

Obvious problem:

   def Drawline(position, position): ...
Oops! We now need a position0 brand and a position1 brand, both of which are aliases for Point.

Re: The Rewards of Creating a Programming Language

#40

Earlier quoted context omitted.

no?

Can you explain how? Obviously at least two people either disagree or aren't privy to the knowledge you hold!

Why do you think they're similar? Is it actually specific enough that it couldn't apply to Pythonic duck typing, or Java interfaces?
Post reply on HN