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…
The Rewards of Creating a Programming Language
71–80 of 88 posts
Re: The Rewards of Creating a Programming Language
#72Earlier 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
#73If 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…
They are nothing more than Objective-C protocols that served as inspiration to Java interfaces.
Re: The Rewards of Creating a Programming Language
#74I wrote this a while back on creating your own language: http://digitalmars.com/articles/b89.html
Someone once told me something similar, "always be customer number one".
Re: The Rewards of Creating a Programming Language
#75Earlier 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 ?
Also how the first C++ compiler used to generate code.
Re: The Rewards of Creating a Programming Language
#76If 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'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
#77Re: The Rewards of Creating a Programming Language
#78Re: The Rewards of Creating a Programming Language
#79I 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'…
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
#80Maybe 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.