Hacker News new | past | comments | ask | show | jobs | submit login

Interesting! It's hard for a single person to tell, because you can only start one way digging into machine learning. However, from a teacher's perspective, this is a useful observation. I also started with Matlab since it was the language that was used in my classes. However, I think this is also a little bit context dependent: For someone who has never programmed before, Matlab may be more intuitive. I think in an ideal world, you should let your students choose what language they want to use to solve the problem :).



   For someone who has never programmed before, Matlab may be more
   intuitive.
Yes, this is Matlab's target audience: programmers who will not call themselves "programmers". In recent versions, they have tried even harder to hide the code away from the user, by trying to make everything work by clicking on buttons. I have heard from many Matlab users call themselves "not a programmer". They don't feel like writing software is what they're doing when they're using Matlab.


On balance, I've met people who claim they are intermediate programmers and use matlab only, and are freaked to shit when they see higher order functions in other languages, or even the idea of passing a "function", like, say, a pointer to a function, into another function, even though function pointers have existed since C.


They exist in Matlab too. They're called function handles. Matlab has functionalish functions like `arrayfun`, `cellfun` (akin to `map`) or `accumarray` (akin to `fold`), but the Matlab documentation prefers to teach loops, presumably because they're easier to understand, and usually faster in Matlab thanks to their JIT compiler.

I'm surprised that people are so surprised that you can pass function handles around, since there are some Matlab functions for solving ODEs or root-finding that are very commonly taught in intro courses that require function handles. I guess not everyone's first exposure to Matlab involves solving ODEs or root-finding.


> function pointers have existed since C

Also at least in ALGOL 68, COBOL, and FORTRAN 77. Maybe earlier, too.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: