Originally posted by Volta
View Post
Announcement
Collapse
No announcement yet.
Rust Porting Begins For Intel's "e1000" Linux Network Driver
Collapse
X
-
- Likes 7
-
Originally posted by mdedetrich View Post
Considering when on the topic of Rust you spent your entire time constantly negatively criticising it without giving it a benefit of a doubt (like all of the software engineers much smarter and with more knowledge on this topic then you) I can safely say that it represents reality quite well.
Being adaptable and not OCD about things that cant be changed is a huge plus for any manager that is going to hire you.
- Likes 4
Comment
-
Originally posted by cb88 View Post
I'd have to say if you get stuck up on syntax you could be the best programmer in the world but you can't speak but one programming language... not many companies will have a use for you. Some of the best paid programmers out there today, are ones that know "crappy" languages well.
Being adaptable and not OCD about things that cant be changed is a huge plus for any manager that is going to hire you.
- Likes 9
Comment
-
Originally posted by mdedetrich View Post
While I understand what you are getting at, defining a functional programming language in such a way is not very useful because you can easily claim that Haskell is not purely functional due to unsafePerformIO or asynchronous exceptions which breaks the mathematical laws of functional programming.
Realistically speaking you have a spectrum, and people have argued that its the languages increasing ability to implement functional programming in an organic/natural way that allows it to be a "functional programming language". In this regard Scala and Haskell are more functional than Rust, since with Rust its difficult to implement functional programming constructs due to it missing certain features (such as HKT's - higher kinded types). Scala for example has a large amount of purely functional programming libraries such as cats/ZIO ecosystems which rival those of Haskell. These kinds of libraries however don't really exist in Java/Rust etc etc, its possible to program in such a way its not ergonomic/idiomatic.
Also notably while a lot of computer scientists/mathematicians, in terms of modern lexicon functional programming is not really the mathematical definition of function but rather the ability to treat functions (or more correctly subroutines) as values hence why lisp and its dialects is regarded as a functional language (as well as languages like javascript). This is why the definition of a purely functional programming language exists which is referring to the mathematical notion of functions and all if its implications (i.e. treating side effects explicitly as well being able to represent functions as values).
The truth is you can write code that adhere to the functional programming philosophy in most languages, even C89, but things like tail recursion, first class functions, etc had to be invented to work around the limitations (and indeed tail recursion is basically cheating by turning functional code into imperative code to avoid blowing up the stack). Many of these features happen to be extraordinarily useful outside of the context of functional programming. However what modern "functional programming" does is it rejects the philosophy and adopts the features instead, philosophically adhering to established imperative programming practices, and there's nothing wrong with that... But there's a reason that while Lisp and Haskell are languages that people are very aware of (indeed I would propose that anyone serious about software development has heard of them and the praise thrown their way), very little software is written in either language compared to C or Python which came out slightly latter than the respective functional language. Meanwhile Rust in particular is seeing widespread adoption​, and yet despite the features the philosophy of functional programming is rare to be found as you yourself admit to.
Perhaps it should be named something else to differentiate, but I do not feel functional programming is an appropriate moniker for modern "functional programming".
- Likes 1
Comment
-
Originally posted by Luke_Wolf View PostThe truth is you can write code that adhere to the functional programming philosophy in most languages, even C89, but things like tail recursion, first class functions, etc had to be invented to work around the limitations (and indeed tail recursion is basically cheating by turning functional code into imperative code to avoid blowing up the stack).
On the other hand first class functions directly effects the code being written (and hence what it means). You can compare Java pre 1.8 and Java 1.8 to see what I mean.
Originally posted by Luke_Wolf View PostMany of these features happen to be extraordinarily useful outside of the context of functional programming. However what modern "functional programming" does is it rejects the philosophy and adopts the features instead, philosophically adhering to established imperative programming practices, and there's nothing wrong with that... But there's a reason that while Lisp and Haskell are languages that people are very aware of (indeed I would propose that anyone serious about software development has heard of them and the praise thrown their way), very little software is written in either language compared to C or Python which came out slightly latter than the respective functional language. Meanwhile Rust in particular is seeing widespread adoption​, and yet despite the features the philosophy of functional programming is rare to be found as you yourself admit to.
This is why even with all of its warts I think Scala is the "best" (and by best I guess you can say "least bad") high level language. It has this very nice blend of OO/modules (modules in the ML sense, i.e. treating sets of possible undefined functions as values i.e. traits/interfaces)/functional programming that allows you to both elegantly and nicely represent and model most programming problems. To boot its also strongly typed which happens to catch a lot of problems at compile time.
Originally posted by Luke_Wolf View PostPerhaps it should be named something else to differentiate, but I do not feel functional programming is an appropriate moniker for modern "functional programming".Last edited by mdedetrich; 19 September 2022, 02:18 PM.
Comment
-
Originally posted by bug77 View PostBut auto is one character longer. See how easy it is?
In Rust you have to specify both let and the type of the variable if you don't want an automatic type deduction. Which is just cringe.
Also in JavaScript you can use "var" as well, AFAIK. Which is infinitely better than "let".
- Likes 1
Comment
-
-
Originally posted by Weasel View PostExcept auto is only used when the type is not specified. And it means automatic type deduction. You don't type it when you specify the type.
In Rust you have to specify both let and the type of the variable if you don't want an automatic type deduction. Which is just cringe.
Also in JavaScript you can use "var" as well, AFAIK. Which is infinitely better than "let".
every language has quirks, if you adapt, you wouldn't be bothered if you had to declare variables using [<###>].
- Likes 4
Comment
-
Originally posted by Weasel View PostAlso in JavaScript you can use "var" as well, AFAIK. Which is infinitely better than "let".
Also using let/var/val is important as it is a variable declaration which should not be mixed/overloaded with a variable definition.
Writing a definition/initialization/assignment "i = 1;" without a specific declaration "dcl int i;" is just bad code and a programming language that allows this is a bad code language. Always use declarations, even bash does this (keyword "local") and IntelliJ complaining to you if you don't do it (rightfully so)Last edited by reba; 19 September 2022, 04:56 PM.
- Likes 2
Comment
Comment