News for hackers. Stuff that matters.
Re:Don't distract new programmers with OOP by pelotom on Thursday March 17, 2011 @12:59AM (#2335142)
Better yet, teach them a language which doesn't even have the "extra layer of [OO] nonsense". Teach them something simple, clean, and logical. Teach them Haskell.
Re:Don't distract new programmers with OOP by warrenwilkinson on Thursday March 17, 2011 @01:35AM (#2335199)
You need monads to do any IO, that's not an easy first lesson. And you are a great distance from hardware.
Re:Don't distract new programmers with OOP by brehaut on Thursday March 17, 2011 @04:05AM (#2335429)

    main = print "Hello, World!"
Not a monad in sight. Yes, print is an IO Action, but you don't have to use monads to do IO. Add in 'interact' and a you can be writing trivial stdin / stdout programs very quickly.
Re:Don't distract new programmers with OOP by anghyflawn on Thursday March 17, 2011 @02:47AM (#2335303)
The first point is not too much of a downer, actually: it's not much harder to learn the IO monad as pure syntactic sugar than to learn printf and its ilk.
Re:Don't distract new programmers with OOP by nickik on Thursday March 17, 2011 @05:53AM (#2335595)
Scheme should be used not Haskell! Haskell can be used in a Algorithems class or something but in the beginning use Scheme.
Re:Don't distract new programmers with OOP by pnathan on Thursday March 17, 2011 @02:14AM (#2335259)
Yick, then you've got an extra layer of type nonsense.
Re:Don't distract new programmers with OOP by dons on Thursday March 17, 2011 @02:53AM (#2335312)
Without types, how do you know you're not writing nonsense?
Re:Don't distract new programmers with OOP by IvarTJ on Thursday March 17, 2011 @03:12AM (#2335355)
As someone who gave Haskell a shot, I was very quickly put off by having to learn functions to convert from integers to floats, while such things were automatically taken care of by more low-level programming languages such as C.

Also, I was confused by the package management with Cabal, and now I appear to have broken it with an error message whenever I start ghci. When choosing a first language for students, you have to think of idiots such as me.

Re:Don't distract new programmers with OOP by wnoise on Thursday March 17, 2011 @03:55AM (#2335411)
I love Haskell. I hate Cabal. It's a bunch of semi-opaque goo on top of a compilation process that wasn't terribly hard to start with.
Re:Don't distract new programmers with OOP by sid0 on Thursday March 17, 2011 @04:08AM (#2335433)
Where exactly were you mixing integers and floats? In my experience it doesn't come up too often, and if it does (e.g. writing area = 2 * pi * r) you'd be better served changing the 2 to 2.0.
Re:Don't distract new programmers with OOP by IvarTJ on Friday March 18, 2011 @04:03AM (#2339750)
I sometimes want to avoid using floats because of the inaccuracy that sometimes arise with their use. If I recall correctly, in Haskell division requires the numerator and denominator to be of the class fractional. So how I did integer division was something like this

round (fromIntegral x / fromIntegral y)

round is one of several functions that transform numbers to integers.

Re:Don't distract new programmers with OOP by sid0 on Friday March 18, 2011 @04:51AM (#2339811)

    Prelude> 5 `div` 2
    2
Haskell's doing the right thing here by having a separate function for integer division. It makes no sense to overload / to mean both regular and integer division.
Re:Don't distract new programmers with OOP by pnathan on Thursday March 17, 2011 @10:31AM (#2336180)
With that reasoning, assembly shouldn't be possible to write correctly.

In other words, because I'm not dumb?

Re:Don't distract new programmers with OOP by dons on Saturday March 19, 2011 @08:38PM (#2345156)
I'm not saying you will write nonsense, I'm asking what evidence you have. The evidence in this case is "I know what I'm doing".