LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-05-2015, 03:35 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post Why "Erlang" ?


Hello.
Why some software moving to functional programming languages like "Erlang" ? Why we can't write a software in C++ like Erlang?
Can you show me some languages like "Erlang" ?


Thank you.
 
Old 06-05-2015, 09:48 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,240

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by hack3rcon View Post
Can you show me some languages like "Erlang" ?
Haskell. Scala and Go to a lesser extent.

I understand that the reason functional languages are popular is because the language design makes it easier to write programs that do more than one thing at once.

Last edited by dugan; 06-05-2015 at 09:50 AM.
 
Old 06-06-2015, 03:58 AM   #3
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Scala is Java based and I guess it is slow . Is Erlang popular? and why it is popular more?
 
Old 06-06-2015, 04:19 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Functional languages allow simpler reasoning about what they do which means it appeals when you care about proving a program correct.

You can use functional ideas in parts of programs in more conventional languages.
 
Old 06-11-2015, 12:56 PM   #5
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Or you can code python and be functional and object oriented at the same time :>
 
Old 06-12-2015, 07:11 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
When folks look at the functional-programming model, they're especially looking for "massive scaleability." In other words, to use hundreds or thousands of processors at the same time in the solution of some problem. (e.g. "map/reduce") A functional expression of that problem (and, a problem that can be expressed in a functional way ...) is much more friendly to that approach.

A traditional, procedural, program is all about time, because it is also all about internal state vs. side-effects. A procedure, despite its name, is a procedure, not a function in the mathematical sense. The name, "function," is ordinarily (but incorrectly ...) used because "it [can ...] return a value." But it can, and does, do many other things as well, and to many things other than itself. The "return code," if any, is usually just an indicator.

The functional-programming approach, well, is simply different. It is designed to be different. It is designed differently. As with all other programming tools, it is definitely something (like Prolog ... like R...) that you should make it your business to know something about.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] X: "loading extension glx" "no screens found" "fatal server error" (w/ nvidia driver) Geremia Slackware 7 12-29-2014 11:00 AM
[SOLVED] "net rpc" "failed to connect to ipc$ share on" or "unable to find a suitable server" larieu Linux - General 0 11-09-2014 12:45 AM
unpredictable "delete" "move to trash" or "cut" file menu option dorianrenato Linux - General 3 11-28-2011 06:41 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration