F# seems to be a language with more 3rd party addons built into the standard Off-The-Shelf offering seen with other languages. My biggest takeaway when I looked at F# is it seemed better suited to db work than C#.
F# seems to be a language with more 3rd party addons built into the standard Off-The-Shelf offering seen with other languages. My biggest takeaway when I looked at F# is it seemed better suited to db work than C#.
https://developers.slashdot.org/story/13/08/25/2115204/inter...
It's frustrating to me, because if Python had adopted at least some of the things that languages like SML then OCaml and then F# were doing, it would dramatically elevate it. At the time of the interview, in which he goes on to state "Admittedly I don't know much about the field besides Haskell", the year was 2013, and so at that point, F#, Clojure, OCaml had already been around for a while, Erlang had been released with a permissive license, and Elixir had actually been released the year before. Further, it's not like even before that that Haskell was the only functional language. SML, Scheme, and even Racket (then known as PLT Scheme) had been around for a while.
Python is a wolf in sheep's clothing to me. It has a deceptively simple look at at the surface, but it is actually a quite complicated language when you get into it. I've done concurrent programming my entire programming life in F#, Elixir, and LabVIEW. I simply do not understand how to do concurrency things in Python in a reliable and composable way (for one, there's several different implementations of "concurrent" programming in Python with various impedance mismatches and incompatibilities). I.e., it's complicated.
One of the languages I've used in the past always performed best on certain AMD cpu's, but that was when we could choose what cpu the compiler was to optimise for, ie 286, 386 etc etc.
I'm also aware of backroom shenanigans going on with some languages and tools working better for some CPU's.
This 12 year old post goes into a lot of detail https://stackoverflow.com/questions/1414911/intel-x86-assemb...
This is half the problem different terminology in use between different age groups, just like slang is different between different age groups.
def f() =
g()
In a language implementation that doesn't optimize tail calls, the stack would look like the following after the call to g: g
f
main
In a language implementation that does optimize tail calls, the stack would look like this, because the result of f is whatever the result of g is so f is no longer needed: g
main
If a language implementation doesn't optimize recursive tail calls, the following code will quickly overflow the stack and the program will crash: def loop() =
do something...
loop()
In a language implementation that does optimize recursive tail calls, this code can run forever because loop's stack frame gets replaced with the stack frame of the new call to loop.The reason people want recursive tail calls optimized out is at a much higher level than anything to do with the actual CPU instructions being used, they just want to have a way to write recursive functions without worrying about the stack overflowing.
What's my age group, by the way?
Languages like Python make implementing simple loops like:
def loop():
<whatever>
loop()
impossible.Python will reach a maximum recursion depth and error.
Why is this important? Like I said, it makes looping very easy. For example, actors can almost be trivially implementing in languages with tail-call recursion.
It’s not in Python because like most things in Python, van Rossum doesn’t like it because <reasons>.
https://stackoverflow.com/questions/13591970/does-python-opt...
There’s little point in having full traces of the data doing in and out of the tail-call loop is immutable, so you only really care about the current call of the function.
Its not something I've every heard of before, I guess its peculiar to Python though but dont most languages have some eccentricity?
Here's an SO answer from 2008 about how to enable TCO in various C and C++ compilers: https://stackoverflow.com/questions/34125/which-if-any-c-com...
There are many things both you and I have never heard of before. That's normal.
This lack of learning theory in our industry, instead going for something that is 'easy to get started' explains the popularity of python and javascript, and at the same time why python and javascript are littered with problems that have already been solved, and cluttering up the field of knowledge by reinventing terminology because they never learned the original existing terms.
> (for one, there's several different implementations of "concurrent" programming in Python with various impedance mismatches and incompatibilities). I.e., it's complicated.
Is this because Python doesnt offer any Co-operative threading model and just exposes programmers to preemptive threading and all the different synchronisation facilities an OS provides? https://docs.microsoft.com/en-us/windows/win32/sync/synchron...
I dont have a problem with any of the synch objects because they also have strengths and weakness which are relevant to what ever the code is doing. Speed of synch objects is one factor, but there are others, like handling of shared data between two or more apps.
So are you saying F# removes the ability to choose synch objects?
Half the problem I find is just keeping up with different terminology used in various parts of the world.