[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Should I Learn a Functional Language?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 9
Thread images: 2
File: cats.jpg (111 KB, 1295x1001) Image search: [Google]
cats.jpg
111 KB, 1295x1001
I'm a mostly self taught hack, I have a firm grip on the front end stack, python and C#/Java.
I keep seeing people gushing about functional programming I fucked around with haskell a bit & I often use ghci as a calculator - but I get lost pretty quick.
I have a couple of questions,
A) Since I'm a .NET VS shill should I learn F#? Or stick with Haskell.. Or something else?
B) What does it really do better than OOPs or quasi OOPs?
C) What can I 'make' with Haskell? Seems all math and no flash

Thanks anon
>>
File: ur_taste_is_pleb.jpg (7 KB, 185x273) Image search: [Google]
ur_taste_is_pleb.jpg
7 KB, 185x273
bump
>>
I feel like people on /g/ just do it for amusement. There is not much call for functional programming and not as much support as other languages.
>>
>>53690643
>A) Since I'm a .NET VS shill should I learn F#? Or stick with Haskell.. Or something else?
What floats your boat? Be comfy.
>B) What does it really do better than OOPs or quasi OOPs?
Less overhead. OOP is a dominant paradigm but people that have grown up in it don't realize just how much semantic overhead comes with it.
>C) What can I 'make' with Haskell? Seems all math and no flash
The point of functional programming is to try to think about things without all the state attached. Once you do that, you expand your understanding and gain yet another paradigm.

It's like going to a Martial Arts instructor and saying "there is only one way", and the instructor promptly shows you about 3 different ways while whooping your ass in the dojo - because your thinking was too rigid to be open to new ways of looking at things. OOP is not the end-all be-all, it is one of many. It's good to have it as a foundation, but if you make yourself do some of the old-timey ways, you learn things that you would never see if you were still stuck in OOP-land.
>>
>>53690643
The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages.

Unlike most languages today, which are focused on defining specialized data types, Lisp provides a few data types which are general. Instead of defining specific types, you build structures from these types. Thus, rather than offering a way to define a list-of-this type and a list-of-that type, Lisp has one type of lists which can hold any sort of data.

Where other languages allow you to define a function to search a list-of-this, and sometimes a way to define a generic list-search function that you can instantiate for list-of-this, Lisp makes it easy to write a function that will search any list — and provides a range of such functions.

In addition, functions and expressions in Lisp are represented as data in a way that makes it easy to operate on them.

When you start a Lisp system, it enters a read-eval-print loop. Most other languages have nothing comparable to `read', nothing comparable to `eval', and nothing comparable to `print'. What gaping deficiencies!

Lisp is no harder to understand than other languages. So if you have never learned to program, and you want to start, start with Lisp. If you learn to edit with Emacs, you can learn Lisp by writing editing commands for Emacs. You can use the Introduction to Programming in Emacs Lisp to learn with: it is free as in freedom, and you can order printed copies from the FSF.

You can learn Scheme (and a lot of deep ideas about programming) from Structure and Interpretation of Computer Programs by Abelson and Sussman. That book is now free/libre although the printed copies do not say so.
>>
>>53690643
>A) Since I'm a .NET VS shill should I learn F#? Or stick with Haskell.. Or something else?
If you're using Windows F#. Haskell is best supported with GNU/Pigcooks, although you can definitely learn using Haskell on Windows. There are some potential complications when you actually want to start building larger projects.
>B) What does it really do better than OOPs or quasi OOPs?
Functions
>C) What can I 'make' with Haskell? Seems all math and no flash
https://www.haskell.org/communities/11-2015/html/report.html
>>
>>53690643
>A) Since I'm a .NET VS shill should I learn F#? Or stick with Haskell.. Or something else?
F# should be good

>B) What does it really do better than OOPs or quasi OOPs?
Concurrency for example. But you are basically trading performance to expressivity/abstractions.

>C) What can I 'make' with Haskell? Seems all math and no flash
It's a general purpose programming language, you can make whatever you want.
>>
Thanks everyone.

FWIW, I only use C# because of work. I'm not a windows guy by any stretch. Been running linux in various distros on my own since '01. I have to admit VS is one of the only IDEs I actually like.

I have an egghead friend with a masters in CS fr MIT and she recommended Scheme for learning functional and Haskell or F# for real life use.

I tried learning from "Learn you a Haskell..." and I kind of got moving with it, but I was hoping for a gui or framework... like XAML is for .NET or HTML/CSS for JS... All I can get going in Haskell is powerful math on the command line, but that's just me.

I love how ranges and list comprehensions make mathy algorithms into neat one-liners. But I don't grok monoids and other aspects.

I guess I can learn & practice with hackerrank, but it seems like a hell of a learning curve.

Thanks all, I'll just putter along in haskell & learn how to put lipstick on it later.
>>
PS I also am not a fan of OOP or objects, I just don't buy into the hype - seems like it was a good idea that got mauled by a bunch of endless meetings by micro-managing, 'I wanna put my stamp on it' type of pencil necked motherfucks.

Don't get me started on agile and scrum.... Why would you name something after a cross between Scum & a Scrotum unless the intentions were evil from the get-go.

YMMV, I've just been on some horrid teams.
Thread replies: 9
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.