Comment

Comment by nynrathod

Doo is a statically-typed, compiled programming language built in Rust + LLVM, designed for building production ready APIs quickly.

0.2.0 Alpha is the biggest update so far. It adds the core foundation for built-in methods, a stronger std library, file I/O, improved modules, error handling, enums, match, array features, map improvements, JSON support, and more.

Highlights

Built-in methods

- Array: len, push, pop, contains, first, last, reverse, isEmpty, clear, sort, slice, indexOf, map, filter, reduce, join - Map: has, remove, isEmpty, size, clear, keys, values - String: len, charAt, subString, toUpper, toLower, contains, startsWith, endsWith, trim, reverse, indexOf, replace, repeat, concat, charCode, countSubstr

Std library

- Array utils: Unique, Range, Sum, Average, MinArr, MaxArr - Math: Abs, Pow, Sqrt, Min, Max, Floor, Ceil, Round - File: Read, Write, Append, Exists, Delete, Size, MkDir, Metadata, ListDir, Copy, Move, ReadLines, RmDir, RmDirAll

Modules & language features

- Imports (namespace, wildcard, alias, inline) - Functions with tuple return, struct + JSON support - Error handling (T!E, ? operator, propagation, custom errors) - Structs with methods, nested structs, shorthand, enums inside structs - Enum types (scoped + inline) - match on primitives, struct, enum, nested match - JSON parse/stringify - Lambda + chained array methods - Inline if/else, ternary in expressions - Array spread, ranges ([...arr], [1..4], [1..=4]) - Improved map iteration - typeOf, cast operators, ++/-- - UTF-8 print

Examples folder => https://github.com/nynrathod/doolang/tree/main/examples

The goal is to keep Doo simple but practical: something you can use to build real APIs or tools quickly without a huge language surface or runtime complexity.

If anyone here enjoys language design, I'd love feedback. It's still early alpha, and I'm very open to feedback. If anything feels weird, confusing, too limited, or too magical, please tell me, I want to shape this based on real developer expectations, not just my preferences.

parent nynrathod 11 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton