|
|
|
|
|
by christopherdone
5965 days ago
|
|
Lisp's macros are a lot more expressive. They don't look weird (unlike Template Haskell) within the language, they look like normal constructs. And they're native to Lisp. I miss Lisp in Haskell because I can't define, e.g., my own macro to do this: case fileExists "sausage.txt"
True -> putStrLn "Gonna do something with the sausage."
False -> putStrLn "Woop."
And/or if do fileExists "sausage.txt"
then putStrLn "Gonna do something!"
else putStrLn "Woop."
Or lambda with alternate lambda cases. (\case of (Just a) -> a; Nothing -> b)
I wrote a little mini-lang to do this to see how much I liked it. I liked it a lot, Lou!But Haskell is terse and predictable so one puts up with not having macros. The Computer Language Shootout Haskell samples are low level, if you read them. Some are high level but many are nearly C, using malloc and such. But this is a good thing; you can write the "tight loops" that you need within Haskell. |
|