On Tue, 28 May 2013 04:53:11 +1000 john skaller <skal...@users.sourceforge.net> wrote:
> As my knowledge of Nimrod is limited to a couple of brief > readings of the manual, my comments below may be quite uninformed. > Apologies to Nimrod devs if I get anything completely wrong. No problem for me... > Nimrod resembles Python in some ways. I like Python syntax, > so this is a plus. The code is just clearer than the C style which > Felix also uses. That's what I like as well. > Nimrod has a lot of front end manipulators: macros, term rewriting, > etc. This stuff looks good in theory but in practice it turns out not > to be very useful. I had a lot of this in Felix at one stage and threw > almost all of it out. That's interesting to hear, although I didn't touch those features when exploring the language...considering them more 'advanced' while I had to check some basic things first. > Instead Felix now has something vastly superior. It has a user defined > GLR+ grammar with action codes which can construct the core terms > the compiler front end accepts, in a very flexible and powerful way > that has a major advantage over anything Nimrod can hope to offer: > the action code is R5RS Scheme, a separately documented standardised > language. I noticed that...it is really powerful. > I find Scheme hard to write, but there's no doubt it is > capable of doing fairly arbitrary calculations with terms > (s-expressions). so a whole lot of half-assed junk is replaced by two > major subsystems: a high end dynamically extensible parser and a high > power term manipulation language. Very smart! > Another difference is that Nimrod has a set of types like char > and bool and int etc. Felix has none of these. All scalar types > are lifted from C++ in the library. The provided set is zero. The > liftable set is infinite. The library provides some basic ones (all > of C and also most of the typedefs, plus C++ complex). Hmm...considering that I was doing C++ many years ago (Zortech compiler times), it seems I'd have harder time to wrap up my head against Felix. > Rather, Felix has type constructors of two kinds: nominal type > constructors for structs and unions (variants), and structural typing > for tuples, arrays and records. And of course functions. D2 has something similar? > Felix has proper first order parametric polymorphism, Nimrod templates > have the same problems as C++ ones: dependent type names. > Felix has strict parametric polymorphism. It has overloading too > (which is a convenience NOT polymorphism), and it has overloading > tricked up to look like polymorphism in a well structured way: > Haskell style type classes. There are some stuff in Haskell which we like, type classes are the one. > There is a downside: Felix iterators, based on generators, are always > closures, and Felix is not so good at optimising them away at this time. But Felix does not have, in general, problem with performance? Moreover, we're not going to write game engine. > Felix does NOT have exceptions. There's a non-local goto, and that's > it. Hmmm. > Felix can *catch* exceptions generated in C code, and it can > *throw* exceptions, but you cannot catch exceptions in Felix thrown > from Felix. That's because exceptions are C++ things that unwind the > machine stack and Felix does not use the machine stack for procedures. That's a bit surprising... > There is no really satisfactory way to handle errors in Felix other > than the C method: check error codes. Felix enforces this (you cannot > forget). Also the returns can be variants. Heh...and I'm just meditating how to replace checking error codes in 3rd party C lib with the higher-level bindings cathing errors via exceptions. :-) > Dynamic exception handling is unsafe and evil, and using types for > exceptions is entirely wrong (Ocaml does it right, exception is a > single program wide type with many constructors). I forgot to mention that I was shortly considering OCaml as well, but, again, only GTK bindings... > Felix does not have any OO support. In the core system that is. That's not problem for me...not so fond of OO. > Roughly speaking, the aim in Felix is to remove as much as possible > from the language and put it in the library. And that includes syntax. What is the target for Felix? Replace C++? What do you think about Rust? > Nimrod has a loop construction or two. Felix has NO loop > constructions. It just has goto and conditional goto. There ARE loops > defined in the grammar, but remember the grammar is in the library. Yeah, now I'm slowly getting it... > Roughly: because it has to bind to C++ by design. Felix is not a nice > clean pure language. There are compromises to be made to achieve this > goal. Yeah, it is logical. Thanks a lot for your effort and wish me good luck to choose wisely which language to use for the planned project. ;) Sincerely, Gour -- Before giving up this present body, if one is able to tolerate the urges of the material senses and check the force of desire and anger, he is well situated and is happy in this world. http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language