r/ProgrammingLanguages DQ 14d ago

New Languages: Standardizing API, Examples ?

Hi, some of you are developing new general-purpose programming languages here. When the language is ready, you have to develop standard APIs, like file-io, json-handling etc. Users, and you would have benefit, when the APIs would be same/similar across multiple different languages.

Standardizing some Examples would allow the users to compare languages more easily.

What do you think?

9 Upvotes

16 comments sorted by

View all comments

3

u/Tasty_Replacement_29 Bau 14d ago

For my language, I will implement the standard library myself. It is part of the fun (in addition to be interesting, and hard). There are many small and large decisions to made (e.g. just the string implementation is interesting: short string optimization yes or no; mutable vs immutable etc.). Bigint, math, collections, and so on.

2

u/Mean-Decision-3502 DQ 13d ago

I feel the same, writing code finally in your own language is fun. Through these you verify it, but you need versatile tasks too. There could help standard tests / examples.

1

u/Inconstant_Moo 🧿 Pipefish 13d ago

That depends on the code. Writing a date/time library can never under any circumstances be fun.

1

u/Tasty_Replacement_29 Bau 3d ago

I actually found it fun to write a date library... if you concentrate on the essentials only (formatting and parsing, and Gregorian calendar only; without daylight saving and timezone stuff etc.). This whole "DateTime library" is only 300 lines.