Live data from Hacker News

The Rewards of Creating a Programming Language

mikedrivendevelopment.blogspot.com

71–80 of 88 posts

Re: The Rewards of Creating a Programming Language

#71

If you’re thinking of writing a language in earnest, you will create something much more valuable if you start from a novel semantics, and only then come up with a syntax to express those semantics, than if you were to start from syntax. The world does not need yet another reskin of Java, but it could use new programming paradigms and new ways of solving problems. As a learning exercise, implementing a language is wo…

I wrote a language once where functions were not allowed to return values. All you could do was pass a continuation that could handle the results of that function. Totally impractical language, but it was fun and did force me to think out of the box.

Re: The Rewards of Creating a Programming Language

#72
post #33
post #31

Earlier quoted context omitted.

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?

    pub trait SomeTrait { ... }

    pub fn some_function(arg: T) { ... }

Re: The Rewards of Creating a Programming Language

#73

If you’re thinking of writing a language in earnest, you will create something much more valuable if you start from a novel semantics, and only then come up with a syntax to express those semantics, than if you were to start from syntax. The world does not need yet another reskin of Java, but it could use new programming paradigms and new ways of solving problems. As a learning exercise, implementing a language is wo…

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…

How come Go has popularized Type Classes?

They are nothing more than Objective-C protocols that served as inspiration to Java interfaces.

Re: The Rewards of Creating a Programming Language

#74

I wrote this a while back on creating your own language: http://digitalmars.com/articles/b89.html

As an aside, I'll note that working on stuff that I needed has fared quite a bit better than working on stuff that I was told others need.

Someone once told me something similar, "always be customer number one".

Re: The Rewards of Creating a Programming Language

#75
post #57

Earlier quoted context omitted.

My favorite way is to output C, which is conveniently human-readable for debugging. Many people also like the LLVM back end.

I new about that possibility but how efficient is it compared to other techniques ?

It is the approach taken by Eiffel. Byte code interpreter for the IDE and compilation to native code via C for distribution.

Also how the first C++ compiler used to generate code.

Re: The Rewards of Creating a Programming Language

#76

If you are a developer and you have never written a language, you owe it to yourself to do this at least once. Writing a language (lexical, syntactic, semantic phase and then code generation) will teach you an incredible amount of things in much less time it would take you to read about these things. What your language looks like is completely irrelevant, this is strictly about learning from the journey. And once you…

I view writing a language as either a creative epiphany or evidence of psychosis, so when I see someone with a language on their CV I'm always careful to explore why they wrote it. Surprisingly often they think it's going to Solve All The Problems rather than allowing them to explore one of the deepest and most important parts of the programming art.

I've written little languages (mostly for generating code in other languages, which proved to be an interesting way to explore certain design patterns) but always shied away from going all in on a bigger language. Maybe when I retire...

Re: The Rewards of Creating a Programming Language

#79
post #54

I was hired (a long time ago) to write a language for a Very Large Telco Equipment Supplier in Canada in order to support their automated regression testing effort for their digital telephone switches. It was called, ingeniously enough, "T" (no, not that "T"). As far as I (and cursory Google searches) know, it was never released to the adoring public. I used lex and yacc (half jokingly referred to as 'ick' and 'yuck'…

Just curious, did you specify order ?

dict[`he.*`] == [4,2] could also hold. Or maybe [...] was a set literal and not ordered list.

Interesting ideas, perlish in spirit, somehow less cryptic.

Was it published ? was there other ideas you could talk about ?

Re: The Rewards of Creating a Programming Language

#80
I'm curious how people feel about syntax. I tend to think everything should be written in sexp (I like [s]ml syntax too though). Much like this http://cs.brown.edu/courses/cs173/2012/book/Everything__We_W...

Maybe I'm missing something, how many people felt that syntax made an idea pop differently and was part of the understanding ? To me it's often the opposite, it conflates too many things in a few symbols and then you waste time discussing corner cases.

Post reply on HN