Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
raminasi
Jan 25, 2005

a last drink with no ice
Which is why it's real nice when your mostly-functional language also has concise facilities for iteration and mutation.

Adbot
ADBOT LOVES YOU

raminasi
Jan 25, 2005

a last drink with no ice
There's no way around hardcoding an explicit mapping for each Enum value somewhere.

raminasi
Jan 25, 2005

a last drink with no ice

Lunixnerd posted:

I initially thought that maybe scala would be the way to go but it seems that it would be really easy for someone to fall back to writing imperative code in scala.

I'm in the camp that considers this a good thing, although I don't know anything about Scala or Clojure specifically.

raminasi
Jan 25, 2005

a last drink with no ice

Pollyanna posted:

So I hear a lot about Lisp's extensibility and metaprogramming capabilities, and how it's good for defining a problem in a language that maps directly to said problem domain. People talk about domain-specific languages and macros and bottom-up programming and "changing the language to suit the problem" which makes it seem a lot more like dark-arts wizardry than a programming language.

I don't really understand what this all means, and how it makes Lisp so powerful/versatile. I get the concept of domain specific languages, even if I have no idea how to make one or what makes a good DSL good, and I understand that homoiconicity means that everything is just data, including code. But I can't seem to connect those concepts to understanding and writing code that maps directly from problem domain to implementation.

It feels like there's supposed to be an aha-moment with Lisp that I haven't had yet, and I don't know what I'm missing. What am I looking for, and how do Lisp's killer features matter in programming it well?

Not to knock Lisp (I've dabbled, but I'm certainly not one of the enlightened), but before you get too depressed about your failure to ascend, remember that for every beautiful Lisp monument to metaprogramming there are a hundred boring-rear end, non-Lisp programs out there doing work that people rely on as well. For all its glories, it hasn't made itself widely indispensable, and after however many years, "well they all just haven't heard the Good Word!" becomes an excuse and not an explanation.

And when I read "Imagine the possibilities if the programmer could modify the abstract syntax tree himself!" the first "possibility" I think of is new heights of unmaintainability.

raminasi
Jan 25, 2005

a last drink with no ice
It looks remarkably similar to what happens if you trick the CLR into loading two weakly-named assemblies with the same name side by side.

Adbot
ADBOT LOVES YOU

raminasi
Jan 25, 2005

a last drink with no ice

Serenade posted:

That's helpful as hell. This is mostly my plan but I didn't know windowed exists and I was thinking of fold, not reduce. Thanks.

At this moment I'm not interested in being true doom functional, but the siren's song of parallel programming is always alluring.

F# has pairwise now so you don't need to deal with incomplete pattern matching off the output of windowed :science:

  • Locked thread