Favourite programming language/framework/library?

hanser

Ars Legatus Legionis
41,687
Subscriptor++
My favorite language is probably C#, because it's so useful across a wide variety of use cases, but more realistically, it's probably because it's the language + platform I'm most productive with. I like that it's a living language with relatively short LTS cycles, to keep things moving forward.

I also really like F#, but mostly to play with and work on my functional programming thinking with. It changes the way you see problems and composition of types within a large program.

I'd like to play with Rust someday.
 

Haas Bioroid

Ars Scholae Palatinae
1,424
Subscriptor
F#, which discovery has been an epiphany. It’s like Arrival, the Denis Villeneuve movie/Ted Chiang novel : at first it looks alien but when you get it, you reach a new state of consciousness.

Then C#, because it’s the one I use at work, I know it well and like how it has evolved : from dull and conservative to leading in many innovations, notably functionalization, that my F# journey helped to embrace.

For the framwork, well .NET.

For a library, Elmish, a F# (again) library for writing GUI with the MVU pattern, or how to use immutable model in a highly mutating environment.

And I freaking love Polyglot Notebook, notebooks for .NET.
 
  • Like
Reactions: zeotherm

SoftwareDevExpert

Smack-Fu Master, in training
10
As for frameworks: the best are typically ones I have written myself from basic components like Compojure. But things like Angular.JS and React are sort of nice too.
I like those JS frameworks, yeah, much more readable and efficient than legacy jQuery :D
Never heard of Compojure though? I reckon that's not used much.

My favorite language is probably C#, because it's so useful across a wide variety of use cases, but more realistically, it's probably because it's the language + platform I'm most productive with. I like that it's a living language with relatively short LTS cycles, to keep things moving forward.

I also really like F#, but mostly to play with and work on my functional programming thinking with. It changes the way you see problems and composition of types within a large program.

I'd like to play with Rust someday.
Why do you say F# changes your way of thinking? How does it compare to C#?

Framework; clearly Django, the admin functionality is unequalled yet, and is really a game changer for many web projects.
Oh yes <3 Gotta avoid all the database individual setups!
 

hanser

Ars Legatus Legionis
41,687
Subscriptor++
I like those JS frameworks, yeah, much more readable and efficient than legacy jQuery :D
Never heard of Compojure though? I reckon that's not used much.


Why do you say F# changes your way of thinking? How does it compare to C#?


Oh yes <3 Gotta avoid all the database individual setups!
Do the first ten Project Euler problems in F# or OCaml and then you tell me. ;)

 
  • Like
Reactions: zeotherm

koala

Ars Tribunus Angusticlavius
7,579
Like any other term that becomes popular, unfortunately functional programming seems to have gained some ambiguity. IMHO it's still pretty clear that it's "passing functions as arguments", and immutability is still a separated (but related) thing.

Thus, for my the magical came about 20 years ago in my second year of CS- which coincidentally had SML (from Haskell, Ocaml, F# family) and Prolog. The revelation with SML came with this innocent looking definition:

Code:
fold f i [] = i
fold f i x:xs = f x (fold f i xs)

(There are many variants of this.)

fold is a function that takes three parameters. The third one is a list of elements of type t. The second one is of type u. The first one is a function that takes a t and a u parameter, and returns a u.

The function is defined on pattern matching on the third element; either the empty list (first case) or a list whose head is x and its tail is xs (so in [1, 2, ,3], x = 1, xs = [2, 3].

Let's evaluate this expression: fold (+) 0 [1, 2, 3], where (+) is the sum function. The t and u types are ints; 0 is an int, the list is a list of ints, and the sum function takes two ints and returns another int.

Code:
fold (+) 0 [1,2,3]  # we apply the second pattern
= (+) 1 (fold (+) 0 [2 3]  # ditto
= (+) 1 ((+) 2 (fold (+) 0 [3]))  # ...
= (+) 1 ((+) 2 ((+) 3 (fold (+) 0 [])))  # now we must apply the first definition
= (+) 1 ((+) 2 ((+) 3 (0)))  # now we apply (+) a b = a + b
= (+) 1 ((+) 2 3)
= (+) 1 5
= 6

Which means, instead of adding a list of numbers with a loop, we can write it as a fold. Most programmers have likely encountered filter and map (filter as in applying a boolean function to a list of elements and returning the list of elements that return true; map is returning a list which is the result of applying a function to all elements of a list), but fold for me is the "non-obvious" one.

Turns out that by turning "procedural" code into composition of these funky functions you can do pretty interesting things; first of all, perhaps express some stuff in a more natural way. But- although this is really not in vogue in this day and age, some operations like map and filter can be parallelized easily. Google discovered that by combining map and fold (they called fold reduce) and map being parallelizable, they could express many computations easily, and execute them very fast.

(This line of thought doesn't lead to easily making everything parallel, unfortunately.)

Also, this leads to purity (e.g. I did what you normally do with a loop and a variable... without a variable!), and it turns out that programming without variables has some nice properties.

(Solving problems using functional languages might lead you naturally to purity, but I don't think it's easy to discover folds without being told they exist.)
 

koala

Ars Tribunus Angusticlavius
7,579
You'll find the post above written a million times on the Internet- probably better and I might have a few mistakes there. Heck, even ChatGPT will likely write a better version.

I actually have written or explained this a few times already. But it's comforting to type it out. Although I think I'm getting old, I was in a hurry and getting the fold definition right took more effort than it should :(

Fold also leads to writing sum = fold (+) 0; notice that there's nothing that looks like a list there; the term to Google is "currying". And that also leads to stuff such as thinking about what is the result of multiplying an empty list of numbers :)

Along with lisp macros, sum types, Prolog's unification algorithm... and not a lot of relatively-obscure, but foundational concepts, you can be very annoying at parties.
 

hanser

Ars Legatus Legionis
41,687
Subscriptor++
IMO, the esoteric language people use to talk about functional programming gets in the way of people actually understanding it, and therefore using it. Feynman would be appalled by the practice.

(Incidentally, Google called it Map Reduce.)

Once you split your types-that-compute out from your types-that-hold-data, So Many Things decompose into nicely parallelizable pipelines that conveniently tend to be very testable. Almost all of my personal and production code has a high-level LINQ statement that controls the program flow that looks something like the below. Before I spent a weekend with F#, my brain just didn't work this way, now I see almost everything this way:

C#:
var results = collection
  .SelectMany(e => _something.Whatever(e)) // map and flatten a collection of collections
  .Where(e => _filter.IsMatch(e))          // filter
  .Select(e => _cpuIntense.DoWork(e))      // map
  .Distinct()
  .ToList();

And with LINQ, you just stick an .AsParallel() where it makes sense to do so. I'd probably write a little microbenchmark using Benchmark.NET to see whether it was more advantageous to put it before the SelectMany or the Select. .AsParallel will automagically split your tasks across the available CPU cores. Very handy for compute-heavy tasks, but it's not magic, and you have to be thoughtful about where you apply it. (I wouldn't use AsParallel inside a type that was being orchestrated at a higher level with AsParallel. You can do it, but perf tends to get worse. So you consider the whole system, and use it where it makes sense.)

I enjoy writing little microbenchmarks for things I do often. Benchmark.NET makes it really easy. For example:

Any time I want to know whether approach A is better than approach B when both approaches are ~equally expressive and maintainable, I write a little microbenchmark. (I tend to value expressiveness over performance for LOB things and toys. I'm glad some people geek out over writing the fastest possible code -- which is what you want in a framework -- but I don't think I'd enjoy it much.)

(*) Note the culture-sensitive string comparisons on non-Windows machines are really awful. Jon Skeet found that years ago, and it still hasn't been fixed, though the problem is understood. I'm not really sure why.
 
Last edited:

senan79

Ars Scholae Palatinae
827
I don't code much now. But I have been using mostly Python for around 15 years with a few years of 1980s C++ before that. My favourite library at any time will be the one I am using at that time since it solves my problem at that time.

So now it is python dash since my current app is a dashboard site and dash ensured that I didn't have to go deep into JS dataviz frameworks like D3. It also ensures that I can hand over this to the backend developers who know only Python.
 

sausagecoma

Wise, Aged Ars Veteran
113
Subscriptor
I'd say C# is my favorite language, and the .NET framework is dang good. I haven't done it in years unfortunately. Right now I use typescript with nestjs. I am very productive with nestjs after a couple years of angular under my belt. Subjectively, nodejs kinda stinks compared to running things with dotnet. I miss threads and parallelism.
 

Mat8iou

Ars Praefectus
4,859
Subscriptor
For language, I'm going with Autolisp.

It was the first time that I saw a macro language integrated so neatly in a program - and with such a low barrier to entry.

For those unaware, AutoCAD historically ran mostly off a command line, with the mouse only used for selecting, snapping to items.

From 1986 onwards, you could also enter lispe expressions directly on this command line.

Drawing a circle and want to give a calculated radius - you can just enter a lisp expression rather than getting a calculator and then entering the number. All you need to understand is Polish notation.

Using a few commands togather more than a few times - just write a brief lisp routine to tie them together, then put c: before the function name and the function can be treated like a any other command built into the software.

Don't get me wrong - it was not without it's glitches and for reasons best known to AutoDesk has not really been updated in over 20 years - but the way it just tied s seamlessly into the way you used the program meant that there was no real throught about adding basic macros - you could just type them in and then carry on working, using the new command you had created. It lacks some key features of Common Lisp that it was based on and doesn't have the elegance of Scheme, or the more modern features of Clojure etc - but it does what it does well. If you want to write a complex add-on, then go for Object ARX or whatever (basically C++ based app specific DLL creation), but if you want to make your day quicker without having to leave your normal work environment it's brilliant.

None of the other options for extending the software (DIESEL, VBA, VBA.NET, ARX, Object ARX etc) have ever worked so neatly as this.

Some other CAD software copied AutoLisp as a feature. The software that doesn't is generally far less easy to customise.

 
I never did Computer Science in school, I come from a Political Science background in university, and then training at a technical college in Computer and Network Engineering. So all my formal training has been hands to the keyboard programming, and very little theory. So stuff like functional programming doesn't appeal to me at all. I don't really care if it changes your worldview, or the way you approach problems. I learned C-style in school, as has almost everyone else, and I don't see a need to change from those patterns and habits. That style of syntax does just fine for probably at least 80% of professional programmers out there. C-style is ingrained in almost all computer programming pedagogy, so it's not going away, and won't be replaced with stuff like Lisp or what-have-you-not. Almost by necessity, all Data Structures courses use C, since it's the easiest way to manipulate the stack and pointer directly, so I don't think it's going to go out of style. I dunno, maybe Rust will displace it eventually? But it's still a C-style language.

I just want to be able to bang out a solution to whatever problem I'm facing at work, with minimal tech debt, and minimal time. Because budget and time are always in short supply. My first official job in IT was using R, which is designed the same way as if you set a classroom full of Kindergartners loose on a canvas and tell them to paint the Mona Lisa. It started out as mostly a functional language, but then had object oriented bolted on. So, yeah, functional programming doesn't appeal to me. Sure, maybe you can write some algorithm more elegantly using a functional style, but I don't care about elegance, I just want something I can write quickly, works with minimal debugging to get production-ready code, and is easily-maintainable in a corporate environment where someone might be picking up this code 5 years later with me in another department, or a different company entirely. I can absolutely guarantee you that you are setting the hiring manager of your team up for a heart attack and a series of migraines if you start coding Functionally, because very few people in the job market write code that way. Maybe in some specific niche sectors.

Python fits the bill for that perfectly. It helps that it's a hugely popular language, so any Joe Blow junior developer that joins the team can read and understand my code, even if I document it poorly (it really is self-documenting by design). Coming from a lot of R to do similar work (data engineering), it's made me appreciate languages that are designed from the outset to be easy to read and maintainable.

It runs in any environment, has a massive amount of code examples and libraries to lean on, is easy to pick up, easy to become proficient at, and easy to become an expert in. I really can't say that about many other languages.

My other favourite language is BASIC because that's what I started with back in the 90s on Windows 3.11, and I love all those Boot-to-BASIC microcomputers of the 80s. It's nice to be at the keyboard on any model from that time period, and be able to whip up a fun little tech demo in a couple of minutes without having to read any hardware-specific documentation.

As an aside, I gotta say, I love declarative languages like SQL and Terraform Script. I think procedural SQL was a huge step back from the original design goal of SQL. I'm still a firm believer that transformations should not be done in SQL. The idea that you can tell the machine what you want, without defining how to get the answer, is just awesome and feels so futuristic. I think this should be the end goal of 95% of programming. I think stuff like ChatGPT is accelerating us along that path, since it can write the implementation for us, after we tell it what we want the code to do.
 
Last edited:

Mat8iou

Ars Praefectus
4,859
Subscriptor
Reminds me of emacs, elisp, and eshell. All of which combined with tramp make a really handy way of dealing with remote machines.
Yes - probably the most similar comparison I'm aware of.
Very low barrier to entry for doing easy stuff, but still a lot of power.
I've no idea why they (Autodesk) didn't continue to develop it further. Even now, forums are full of people using it, with tips and suggestions, whereas VBA.net is rarely mentioned.
It didn't matter so much that Autocad wasn't using the same macro language as a lot of other stuff - it's software that people tend to be using all day every day, rather than dipping into occasionally, so users are happer with the best tool for that job, rather than soime vague sense of transferability of skills from other software (that they probably didn't have in the first place).
 

Mat8iou

Ars Praefectus
4,859
Subscriptor
My other favourite language is BASIC because that's what I started with back in the 90s on Windows 3.11, and I love all those Boot-to-BASIC microcomputers of the 80s. It's nice to be at the keyboard on any model from that time period, and be able to whip up a fun little tech demo in a couple of minutes without having to read any hardware-specific documentation.
My first experience was on the BBC Micro Model B.
It was great that a fair bit of the educational software (stuff that didn't require fast response times) was in BASIC on it, you could just list the code of the program and try to work out how they did something in it.
I wasn't aware at the time, but it's version of the language was fairly advanced to that on the more popular C64 - it could create named functions and procedures that you could pass variables to, as well as repeat ... until loops, so although it used line numbers, you could just about avoid ever referencing them and not use goto or gosub if you put a bit of thought into it.

Sort of like an early stepping stone to what version like Quickbasic became.

It also had a built in assembler - you could integrate assembly within your BASIC code fairly easily.

When we first got Windows 2.0 based PCs at the school, they seemd a bit limited in some ways - with a lack of any built in way to program easily without additional software.
 

Aleamapper

Ars Scholae Palatinae
1,284
Subscriptor
As an aside, I gotta say, I love declarative languages like SQL and Terraform Script.
My last few jobs have involved only a tiny bit of SQL and I really miss it. Day to day problem solving in SQL always felt like much more of a fun 'puzzle' than day to day problem solving in generic service layer code, and optimising queries was so much fun too. If I could do my hobby programming in SQL, it miiiiight be my favourite, but I can't.

My favourite would either be C# or Swift. Both have sore points and both are missing features from the other, but they're both mostly lovely to work with.
 

koala

Ars Tribunus Angusticlavius
7,579
This forum is a sampling of the real world, which is likely not very representative of the general programming population. (Look at perpetual threads, C# >> Rust, that's a pretty strange picture- even if both are popular. I think this forum leans a bit MS-y [nothing wrong with that], so a mostly-Apple ecosystem language is likely underrepresented here.)

Plus, I suspect there are many well-known good Swift (and Apple programming in general) communities out there.

I find Swift very interesting, but time is finite and while there's some support for using Swift outside Apple devices, I think it doesn't have a lot of legs yet (and... I think that's a shame).

I'm kinda falling into the I want an "easy Rust" meme. F#/Ocaml seem to be that... but I can't seem to get motivated to work on those, for some reason. I was pondering playing a bit more with Dart (yes, there's a lot of doom and gloom about that...).
 

hanser

Ars Legatus Legionis
41,687
Subscriptor++
This forum is a sampling of the real world, which is likely not very representative of the general programming population. (Look at perpetual threads, C# >> Rust, that's a pretty strange picture- even if both are popular. I think this forum leans a bit MS-y [nothing wrong with that], so a mostly-Apple ecosystem language is likely underrepresented here.)

Plus, I suspect there are many well-known good Swift (and Apple programming in general) communities out there.

I find Swift very interesting, but time is finite and while there's some support for using Swift outside Apple devices, I think it doesn't have a lot of legs yet (and... I think that's a shame).

I'm kinda falling into the I want an "easy Rust" meme. F#/Ocaml seem to be that... but I can't seem to get motivated to work on those, for some reason. I was pondering playing a bit more with Dart (yes, there's a lot of doom and gloom about that...).
In any internet community, there's usually a small handful of people that do the majority of the heavy lifting in terms of perpetuating conversation. I'm one of those people. For whatever reason, I've always been at MS places. If I'd wound up at Amazon or something, I'd probably be talking a lot about Java, and we'd be discussing how Java-centric this place is.

I like to explore and learn, and one of the ways I do that is through writing.

All it takes is one person to start threads on a topic, and participate in them over extended periods of time, and you can influence the community to some extent.
 
  • Like
Reactions: Apteris

timezon3

Ars Scholae Palatinae
1,477
Subscriptor
Favourite? It's hard for me to get beyond good old C. Though I don't use it (or even C++) for anything currently. Perl is up there for me, in terms of a language that Lets You Get Shit Done Quick. Again, I don't have anything I'm using Perl for right now though. I really liked what I saw of Objective-C while I was trying it out for iOS development (pre-Swift) and I'd like to give Swift a try sometime. In terms of framework, I thought the XCode / Objective-C / MVC thing was pretty well laid out, I'm assuming they stuck with MVC when switching to Swift?

What I'm actually coding nowadays is all Scala. It's decent enough I guess (my first functional programming experience). I don't think I could do it without VSCode / metals though. Purity / immutability is an interesting concept.
 

Aleamapper

Ars Scholae Palatinae
1,284
Subscriptor
In terms of framework, I thought the XCode / Objective-C / MVC thing was pretty well laid out, I'm assuming they stuck with MVC when switching to Swift?
Yeah, the ObjC MVC stuff was mostly really nice. Nowadays SwiftUI seems the way forward. Like pretty much anything Apple, when it works it's the best thing around, but when it doesn't it's stupefyingly frustrating. I still really like it though, the idea is good, it's just that the implementation isn't mature yet.

Xcode on the other hand...it feels lightweight and responsive compared to something like Visual Studio, but I only use it for personal/hobby projects, and I've got a feeling it's probably horrid beyond a certain project size. Its refactoring tools are also practically non-existent, which was fine back in the days of something like ObjC, but unforgivable in this day and age, particularly with a language like Swift.
 

meat

Ars Scholae Palatinae
1,059
For language, I'm going with Autolisp.

It was the first time that I saw a macro language integrated so neatly in a program - and with such a low barrier to entry.

For those unaware, AutoCAD historically ran mostly off a command line, with the mouse only used for selecting, snapping to items.

From 1986 onwards, you could also enter lispe expressions directly on this command line.

Drawing a circle and want to give a calculated radius - you can just enter a lisp expression rather than getting a calculator and then entering the number. All you need to understand is Polish notation.

Using a few commands togather more than a few times - just write a brief lisp routine to tie them together, then put c: before the function name and the function can be treated like a any other command built into the software.

Don't get me wrong - it was not without it's glitches and for reasons best known to AutoDesk has not really been updated in over 20 years - but the way it just tied s seamlessly into the way you used the program meant that there was no real throught about adding basic macros - you could just type them in and then carry on working, using the new command you had created. It lacks some key features of Common Lisp that it was based on and doesn't have the elegance of Scheme, or the more modern features of Clojure etc - but it does what it does well. If you want to write a complex add-on, then go for Object ARX or whatever (basically C++ based app specific DLL creation), but if you want to make your day quicker without having to leave your normal work environment it's brilliant.

None of the other options for extending the software (DIESEL, VBA, VBA.NET, ARX, Object ARX etc) have ever worked so neatly as this.

Some other CAD software copied AutoLisp as a feature. The software that doesn't is generally far less easy to customise.


I learned enough Autolisp to be extremely efficient in AutoCAD using macros and the keyboard, while others were using old school tablets and pulldown menus. I didn't really care for the language itself compared to others, but it got the job done. Autolisp was awesome for answering all of the text based questions versus manipulating the GUI boxes that made AutoCAD easier to use.
 
  • Like
Reactions: Mat8iou

Haas Bioroid

Ars Scholae Palatinae
1,424
Subscriptor
I learned enough Autolisp to be extremely efficient in AutoCAD using macros and the keyboard, while others were using old school tablets and pulldown menus. I didn't really care for the language itself compared to others, but it got the job done. Autolisp was awesome for answering all of the text based questions versus manipulating the GUI boxes that made AutoCAD easier to use.
I do quite a lot of AutoCAD development, but I use the .NET API.
 
This forum is a sampling of the real world, which is likely not very representative of the general programming population. (Look at perpetual threads, C# >> Rust, that's a pretty strange picture- even if both are popular. I think this forum leans a bit MS-y [nothing wrong with that], so a mostly-Apple ecosystem language is likely underrepresented here.)
There are sub-specialties of programming. Some of us are database programmers, some of us write purely command line software, some of us are systems programmers, some of us are data engineers, some of us do scientific computing, etc.

I don't know how much you can do with Swift outside of the Apple ecosystem, and while MS has their own ecosystem, writing in C# is very portable, and that makes it a popular topic of discussion even outside of people who work in MS shops. I've never worked in an MS environment, yet I still know C#. Being very similar to Java helps. I've only done side contracts to write iOS apps, which is why I have a passing familiarity with Swift, but I don't think I'd ever have a use for it in my professional life otherwise. Especially not where my career has ended up, as a data engineer. C# can be very helpful for data engineers, even if your org barely uses MS.

Swift is available for Linux, but honestly, how many people are using it that way? And with more and more stuff being done in the cloud, there is absolutely nothing you can do in the cloud with Swift. I use Python, Java, C++, and even Bash (dockerfiles) in GCP all the time. GCP has client libraries for all their services for C#, and all the documentation also includes C# examples, if that's what you wanted to use.

Swift as far as I can tell is mostly for end-user consumer-grade GUI-based desktop/mobile software. Just a guess, I've never seen stats on this, but I would be willing to bet that the vast majority of Swift programs being written are GUI apps for Mac OS and iOS. That necessarily limits the number of use cases for it, therefore, the types of programmers writing in it.
 
Last edited:

Aleamapper

Ars Scholae Palatinae
1,284
Subscriptor
And with more and more stuff being done in the cloud, there is absolutely nothing you can do in the cloud with Swift.
I'm not familiar with GCP at all, but just a cursory googling shows Swift is supported using GCR, swift.org has an article about it, amongst others. You can run Swift apps/functions in AWS and Azure too, and Apple have a Swift on Server working group for getting more traction and support in the whole cloud/server/serverless space.

But yeah, the support for backend and scientific/research development is nowhere near what you have for something like C#, and that definitely shapes how Swift gets talked about online.
 

Lt_Storm

Ars Praefectus
16,294
Subscriptor++
I'm not familiar with GCP at all, but just a cursory googling shows Swift is supported using GCR, swift.org has an article about it, amongst others. You can run Swift apps/functions in AWS and Azure too, and Apple have a Swift on Server working group for getting more traction and support in the whole cloud/server/serverless space.
Which shouldn't be surprising, after all, you can install pretty much anything on a VM and all cloud providers offer that.
 
Which shouldn't be surprising, after all, you can install pretty much anything on a VM and all cloud providers offer that.
Yeah, I don't think that really counts as "supported". Even using GCR, you're basically recommended to install Swift from scratch in a container. That level of support is the same as installing Brainfuck, and then running code written in Brainfuck that way.

By supported, I mean as a first class citizen with first party client libraries for stuff like BigQuery, Cloud Logging, Pub Sub, etc as you have for Python, Java, C#, etc. For example, I can do JSON streaming inserts (a very BQ-specific feature) using a couple lines of Python I copied from example code:

You'd have to write your own wrapper to do that in Swift. This is the part you'd have to write completely from scratch if you were to do it in Swift:
Code:
from google.cloud import bigquery

# Construct a BigQuery client object.
client = bigquery.Client()
 
Last edited:

bjn

Ars Praefectus
3,217
Subscriptor++
I'm an old C++ head, I know it is quirky and awkward at times, but I still love it. C++20 and up coming C++23 sort quite a few issues out and make it much nicer.

I've played with Rust, with a thought to doing a new project in it, and TBH it left me cold. Some really nice features in there that C++ could do with (eg: the equivalent of a Rust switch statement in C++ is fugly), but overall I thought meh. Especially the blah you seem to have to go through to make complex data structures like graphs (and no Petagraph would definitely not work for my use case).

Python is my goto language for scripting and/or quick and dirty coding. I rarely bother writing bash scripts anymore.

I hate Javascript with a hatred that is deep within my bones.
 
  • Like
Reactions: LID919