Earlier quoted context omitted.
Well, its more direct in that, while it increases the number of branches, it minimizes the number of statements executed on any branch. It's also the solution that maps most directly to the problem statement, and, absent a strong technical reason to do otherwise, a direct mapping from requirements to code is a good thing.
I disagree that it maps most directly to the problem statement. You're performing a common factor computation in your mind, which may be more difficult given numbers other than 3 and 5. In my opinion, pattern matching offers the most direct solution and comes with an abundance of compiler optimizations. Here's an example in Rust... for i in range(1i, 101) { match (i % 3, i % 5) { (0, 0) => println!("Fizzbuzz"), (0, _…
Streem – a new programming language from Matz
101–110 of 199 posts
Re: Streem – a new programming language from Matz
#102Re: Streem – a new programming language from Matz
#103Re: Streem – a new programming language from Matz
#104Earlier quoted context omitted.
Does he really get a "lot of flak" for Ruby? While I know not everyone loves Ruby, it seems crazy to me that people would denigrate Matz on a personal level...to me (admittedly, a novice in designing languages), Ruby always seemed well-thought out...that is, the trade-offs do not seem out of line given the philosophical benefits, and not everyone can make claim to turning a personal project into a worldwide language.…
I don't think so many people have a problem with Ruby the language so much as the culture around Rails.
Re: Streem – a new programming language from Matz
#105Re: Streem – a new programming language from Matz
#106Re: Streem – a new programming language from Matz
#107Earlier quoted context omitted.
I disagree that it maps most directly to the problem statement. You're performing a common factor computation in your mind, which may be more difficult given numbers other than 3 and 5. In my opinion, pattern matching offers the most direct solution and comes with an abundance of compiler optimizations. Here's an example in Rust... for i in range(1i, 101) { match (i % 3, i % 5) { (0, 0) => println!("Fizzbuzz"), (0, _…
> I disagree that it maps most directly to the problem statement. You're performing a common factor computation in your mind, which may be more difficult given numbers other than 3 and 5. Well, sure, explicitly calling out i % 15 rather than (i % 3) && (i % 5) or the equivalent has that problem. > In my opinion, pattern matching offers the most direct solution and comes with an abundance of compiler optimizations. Pa…
Re: Streem – a new programming language from Matz
#108I am glad that someone is working on a new stream processing language, it is a very interesting paradigm. However I hope that they provide some very robust tools for controlling input splitting. As I have spent too much time fighting with awk and wishing it was more flexible(it is frustrating always having exactly two levels of splitting with only matchers on the first and only inverse splitting on the second). As is…
Awesome ! Let's call it sed ! Reference: https://www.gnu.org/software/sed/manual/sed.html#Examples Sorry, I couldn't miss that one. :) Really, check the example. Sed is most powerful tool and can do astonishing work.
It would however be nice to have a tool with similar power but simpler, more comprehensible syntax. One of the other commenters linked to an interesting document on sam, which has a better control flow but equally arcane syntax.
Re: Streem – a new programming language from Matz
#109Re: Streem – a new programming language from Matz
#110I am glad that someone is working on a new stream processing language, it is a very interesting paradigm. However I hope that they provide some very robust tools for controlling input splitting. As I have spent too much time fighting with awk and wishing it was more flexible(it is frustrating always having exactly two levels of splitting with only matchers on the first and only inverse splitting on the second). As is…
" new stream processing language"... which are the olds? I'm playing with the idea of build a language, where the functions are unix-like, with STDIN, OUT & ERR. So, instead of raise a exception, it put data in ERR... and make it easy to compose them.
If you google stream processing language you will also get a whole bunch that are not text specific. They are definitely worth looking at if you are interested in building any kind of stream based language.