DEV Community

Discussion on: "Hello, World!" but in 30 different languages!!!

Collapse
 
gracrys profile image
Gracrys

Haskell one is wrong

is using the repl. And is not even printing a thing

Haskell would be Main = print "Hello world"

Collapse
 
craigmc08 profile image
Craig McIlwrath

putStrLn would probably be better for this, so it doesn't display the quotes

Collapse
 
spicydonuts profile image
Madeline Trotter

This isn't valid file or repl syntax.

For the repl:

putStrLn "Hello world"

For a .hs file:

module Main where

main = putStrLn "Hello world"

(function definitions are lower case, types and modules are capitalized)

Collapse
 
muhimen123 profile image
Muhimen

Bug in the post ๐Ÿ™„. Fixing it right now!

Collapse
 
spicydonuts profile image
Madeline Trotter

I'm not sure what it used to be, but this update isn't right. Here are two valid definitions: dev.to/spicydonuts/comment/ofod