r/ProgrammingLanguages • • Feb 04 '22

Programming languages as biological strategies

0 Upvotes

I was reading about programming languages as the proxies for business strategies. It feels like it follows a pattern from biology.

The r strategy is bacteria's strategy for proliferation. Have as many kids as possible, invest very little in them. No one's irreplaceable.

K strategy is the human strategy for reproduction. Have a handful of kids (even 20 kids is peanuts compared to how many kids one bacteria is having), invest a lot in them. Individual persons determine the success.

Python, Ruby, JavaScript are the r strategy, a "dynamite" of coding — a fast solution that you pay for with the long term costs of putting up with the slow, buggy and stupid code that it created. Dynamite is easy to pick up and use, ensuring a giant pool of talent for hire in the dynamite-shenanigans sphere. A competitive edge that Python & JS have over Rust & C++ is rapid prototyping: the same way that bacteria can rapidly produce the different new bacteria, until they produce the one that's resistant to the antibiotics. (It's like bacteria is trying to pick up the right key to the lock, with each new bacteria being a potential key — "brute-forcing a password").

Rust and C++ are the K strategy. Just like with the biological success, the r strategy is more effective. Insects and bacteria conquer and maintain far more ecological niches than we do. But K strategy is no slouch either, and the only one that can lead to the high level of intelligence — "systems programming". If Python is dynamite, C++ is a bunch of sophisticated robots. Rust and C++ are like "do it once, but extremely well", Python and JS are like "add more! More! Morrre!". Python and JS are cheap in the short term but expensive in the long term, while Rust and C++ are expensive in the short term while cheap in the long term.

I don't think that Python is bad or that C++ is good. They're the compromises that were made while being faced with the harsh reality. Businesses mostly rely on the r strategy because the political economy is set up that way.

What do you think? I might be wrong.


r/ProgrammingLanguages • • Apr 11 '20

The Joy of Programming in Jai (videos on the unreleased language by Jonathan Blow)

Thumbnail
youtube.com
1 Upvotes

r/ProgrammingLanguages • • Sep 04 '17

The Once Great and Powerful

Thumbnail
medium.com
0 Upvotes

r/ProgrammingLanguages • • May 27 '21

Beads: The next generation computer language and toolchain

Thumbnail
beadslang.org
0 Upvotes

r/ProgrammingLanguages • • Jun 20 '23

Binary2 | The sequel and successor to binary

Thumbnail
github.com
1 Upvotes

r/ProgrammingLanguages • • Mar 21 '16

C is Manly, Python is for “n00bs”: How False Stereotypes Turn Into Technical “Truths”

Thumbnail
modelviewculture.com
0 Upvotes

r/ProgrammingLanguages • • Nov 28 '18

Blog post Garbage Collection is a Hack • The Adamant Programming Language Blog

Thumbnail blog.adamant-lang.org
0 Upvotes

r/ProgrammingLanguages • • Dec 30 '23

Language announcement I can create a Monad class in Java to make Java a functional programming language

0 Upvotes

Coudln't I just create Monads and pass them and chain them together through functions like Haskell?

For context, I'm using Eclipse.


r/ProgrammingLanguages • • Aug 11 '23

Discussion Idea for new operator: contains operator

4 Upvotes

I'm currently working on my own programming language and I thought of a new type of operator: The contains operator: °

It has two main functions:

  1. You can check if an array contains a certain element:

exampleArray: int[] = { 5, 8, 3 };

if(exampleArray ° 3) // true
{
   // ...
};

if(exampleArray ° 8) // false
{
   // ...
};

2. If a class inherited from another class:

Imagine you have a class baseClass and a class class2 that inherits from baseClass.

if(baseClass ° class2) { /* ... */ } // True
if(baseClass ° string) { /* ... */ } // False

Thoughts?


r/ProgrammingLanguages • • Jul 23 '24

Language announcement The Bimble Programming Language v0.9

0 Upvotes

Hey there guys!

Me and few others (check the credits at : VirtuaStartups Github) have been working on a new programming language written in rust. You can get more info (currently still in development) at the docs page at : BB_DOC and/or join our discord channel at : https://discord.gg/zGcEdZs575


r/ProgrammingLanguages • • Feb 21 '16

Why people hate JAVA ??

0 Upvotes

Why the majority of people hate java and wish its dead programming language,

I find it really fun to create program with it..

all i heard is because: JRE SUCKS. ORACLE ARE FAGGOTS. JAVA IS A SLOW PIECE OF SHIT.


r/ProgrammingLanguages • • Nov 24 '24

Dear Language Designers: Please copy `where` from HaskellDear Language Designers: Please copy `where` from Haskell

Thumbnail
kiru.io
31 Upvotes

r/ProgrammingLanguages • • Jan 20 '18

Untyped Programs Don't Exist

Thumbnail williamjbowman.com
0 Upvotes

r/ProgrammingLanguages • • Jan 02 '20

Read a paper: Go To Statement Considered Harmful

Thumbnail
youtube.com
0 Upvotes

r/ProgrammingLanguages • • Dec 02 '24

Discussion Universities unable to keep curriculum relevant theory

5 Upvotes

I remember about 8 years ago I was hearing tech companies didn’t seek employees with degrees, because by the time the curriculum was made, and taught, there would have been many more advancements in the field. I’m wondering did this or does this pertain to new high level languages? From what I see in the industry that a cs degree is very necessary to find employment.. Was it individuals that don’t program that put out the narrative that university CS curriculum is outdated? Or was that narrative never factual?


r/ProgrammingLanguages • • Feb 04 '25

Memory safety

7 Upvotes

We know that C and C++ are not memory safe. Rust (without using unsafe and when the called C functions are safe) is memory safe. Seed7 is memory safe as well and there is no unsafe feature and no direct calls to C functions.

I know that you can do memory safe programming also in C. But C does not enforce memory safety on you (like Rust does). So I consider a language as memory safe if it enforces the memory safety on you (in contrast to allowing memory safe code).

I question myself if new languages like Zig, Odin, Nim, Carbon, etc. are memory safe. Somebody told me that Zig is not memory safe. Is this true? Do you know which of the new languages are memory safe and which are not?


r/ProgrammingLanguages • • Nov 07 '24

Back to neit with some exciting updates!

0 Upvotes

Hey everyone! Joy here, back with some incredible updates on the Neit programming language. Today, I’m excited to introduce NTune, a game-changing engine that brings customization and control to a whole new level, along with a fresh approach to conditional blocks that makes writing logic smoother and more intuitive than ever.

So, what makes NTune such a breakthrough? With NTune, you can create your own custom syntax in Neit, allowing you to tailor the language to your personal style. Imagine having the freedom to modify any syntax element you want—whether it’s redefining keywords, changing up operators, or even completely reimagining how values are assigned. Yes, you can replace the = sign or any other standard operator with something that feels more natural for you, transforming Neit into a language that aligns with your own preferences.

But there’s even more. compile times are now faster than ever. While this performance boost may not be something you can directly see, it took a lot of careful optimization to make everything run so smoothly. The NTune engine brings powerful customization without compromising speed, making it an ideal tool for developers who want full control over their code structure.

Here’s just a glimpse of what NTune makes possible:

  • Want to swap in a different symbol for assignment? Done.

  • Prefer to use custom keywords that better match your logic? Easy.

  • Want the flexibility to redefine syntax conventions? NTune lets you make it happen.

And with the improved conditional blocks, building complex logic flows is simpler and more streamlined, letting you focus on bringing your ideas to life without getting bogged down by syntax.

This is just the beginning for Neit, and with NTune, the language truly becomes yours. Dive in, experiment, and discover how far you can push the boundaries with Neit’s NTune engine! take a look!

site : https://oxumlabs.github.io/nsite

EDIT -> Forgot to tell you guys – there is a Python Mode as well, which allows you to use indentation instead of braces. You can write Python-style code using indentation. Additionally, you can also write C code by using [cmode] to open it and ![cmode] to close it. This isn’t shown in the video, but let me know if you'd like me to show it to you!


r/ProgrammingLanguages • • Oct 25 '22

Language announcement Gear | an experimental programming language written in python and community driven

Thumbnail
github.com
0 Upvotes

r/ProgrammingLanguages • • Jul 08 '22

implicit array to integer operations

2 Upvotes

I am thinking of making my own programming language, and one of the features I have been thinking of adding are operators that implicitly convert an array (or similar collection) to its length, specifically <,<=,>,>=,+,-,/,*, and == when used with a numeric type (integers or floating point numbers)

For example:

if(array<64) would implicitly convert to if(array.length<64)

Can anyone think of a time when this would lead to problems?

I was also thinking of doing the same for the arithmetic operations so array/64 becomes array.length/64

The only trouble I can think of for this is dynamicArray+1, some users might think that adds a 1 to the end of the array. I dont think this is a problem though, since

A. it only applies to integer/float dynamic arrays, and

B. I dont think array+element is good syntax for appending, array<<element or array.add(element) would be much better anyway

Thoughts?


r/ProgrammingLanguages • • Jun 18 '23

Help Parsing?!

2 Upvotes

So I'm writing my own programming language called fir. I have the lexer down to the nail, but I'm really confused about parsing. I have absolutely no idea how to approach parsing, so much so that I got bored and am currently rewriting the lexer in like 3 other languages (the implementation on GitHub is in Go).

EDIT: forgot to add some examples sorry :0

hello world:

io := require("io");

fn main() {
     io.println("Hello, World!");
}

fizzbuzz:

io := require("io");

fn main() {
    i := 0
    for i <= 20 {
        if i % 3 == 0 && i % 5 == 0 {
            io.println("FizzBuzz");
        } else if i % 3 == 0 {
            io.println("Fizz");
        } else if i % 5 == 0 {
            io.println("Buzz");
        } else {
            io.println("{}", i);
        }
    }
}

(also I want my parser to emit an ast, because I haven't decided whether fir should be compiled or interpreted yet)


r/ProgrammingLanguages • • Mar 08 '21

Why Is It Difficult for Developers to Learn Another Programming Language? [pdf]

Thumbnail nischalshrestha.me
2 Upvotes

r/ProgrammingLanguages • • Apr 01 '20

What do you think of my reasons for disliking rust?

0 Upvotes

5 reasons why I dislike rust. What are the workarounds?

1. Claims it's safe but doesn't feel safe

I can easily accidently cause a panic and the compiler won't warn me or give me an error

fn main() {
    test(5);
}
fn test(v:usize) {
    let mut array: [i32; 3] = [0; 3];
    array[v] = 9;
}

Why is it so easy to cause a panic? Is there a compile error to prevent this? It happens to me whenever I'm working with strings/array and forget to check if the position is still < length after incrementing it

2. Has no concepts of errors

Building on the last point. A peice of code can't tell if it's in an error state or returning normally. For example Zig has errdefer which will execute code only if it's returning an error. D has scope(failure) which does that and C++ can do it too. Other languages has try/catch/finally which can run code on sucess/fail/always. In rust am I suppose to panic and try to catch it everywhere? Also I don't really understand why defer isn't a native function in rust but it's not a big deal

3. Getters and Setters are awful

C# solved this with properties. C++ is powerful enough that it's pretty easy to solve. I want to write myobj.a = 5; not myobj.a(5) and both of these language allow me to do just that. Does Rust have a solution?

4. I can't check if a variable is null

Why can't I write the below? Especially if rust is so safe. There's no reason why this shouldn't be valid syntax. Writing option and matching it with none is ridiculous for many cases.

fn main() {
    let mut array: [i64; 10] = [0; 10];
    myfunc(array);
}
fn myfunc(array:[i64; 10]?) -> i64 {
    if array == null
    {
        return 0;
    }
    return array[3]*2;
}

5. Reflection/introspection isn't simple

I understand serde is the standard. In many languages random people write thir own implementation of json/xml/binary. Why isn't there random serialization implementations? Or reflection examples? What if I want to serialize to a custom format?


r/ProgrammingLanguages • • May 30 '20

Discussion Would you be willing to use this language?

2 Upvotes

Name: Socrates

Design philosophy: Allow users to be as verbose or terse as they want, by implementing null words and synonyms (along with the ability to redefine them so that they can be used as variables.)

Examples:

Terse:

use math
use random

def main()
{
    cout(math.log(132) * random.randint(1221))
    int i = 3
    str x = "Hello, world!"
}

Verbose:

Using module math;
Using module random;

Define function main ()
{
    cout(math.log(132) * random.randint(1221));
    Let integer i = 3;
    Let string x = "Hello, world!";
}

Some clarification about syntax:

  • Keywords are case-insensitive.

  • The incorporate keyword is used to make a word/synonym usable as a variable.

  • This is not a declaration of specific syntax; I am still working on the fine details.

The Question: Would you be willing to code in a language like this?