HN user

ronlobo

33 karma
Posts0
Comments31
View on HN
No posts found.

Promising!

Has anybody incorporated an AI into c2rust to do the heavy lifting and learning from the compiler errors to self fix the transpiled code?

This Can’t Go On 5 years ago

I agree. The book "Factfulness" by Hans Rosling is an excellent read about the topic.

Yes, growth in economy and population can go on and will likely result in an S-bend curve in the distant future.

Just AI transpile to Rust: problem solved :D

No seriously, AI will take years to understand the context.

Coding is more about capturing real world knowledge into a functional program. It involves so much learning about how to translate processes, workflow and regulations into a binary that it seems naive to have an AI code generation tool we even can't understand.

Yeah it is, don't use it.

All the advancements on PHP are great, it's becoming a JAVA more and more, but likely any PHP legacy apps will never see an upgrade to the latest version. And starting a new project in PHP, nah, there are better more well designed programming languages.

Timescale is what you want to go with in case of RDMSes with audibility in terms of change management over time.

It is the THING.

Thanks the timescale team for making this happening!

Very interesting read, thanks for putting that together.

I am wondering how these ideas relate to "value objects", a term formed many years ago via domain driven design.

I agree to the point you're mentioning industry standard. PHP is not considered in the enterprise environment, simply for all it's flaws and it's security vulnerabilities and still has the same problems as before. Most languages don't have those problems.

Hey Lawrence,

Thanks for this detailed comment and the historical background, it is very informational!

It is exciting to see Microsoft is pushing so many efforts into Rust and WASM.

The Rust onboarding experience is incredibly explicit and once things start to click and code compiles, you're on the train.

Secure by Design 6 years ago

Agree, strongly typed languages are best suited for this as it usually allows to embed business domain invariants into the type system which can be checked at compile time.

Rust does a great job in that regard and is not too slow.

Interesting article, also very F# specific.

A similar approach with type aliases (to be moved to value objects or structs with behaviour aka rich models) in Rust.

```rust type Amount = u128; type MoneySign = Option<Sign>; type Precision = u8; type CurrencyIsoCode = &'static str; type CurrencyName = &'static str; type Currency = (CurrencyIsoCode, CurrencyName); type Money = (Amount, MoneySign, Precision, Currency); type Balance = (Money); type ExpirationDate = &'static str; type MoneyWithdrawalError = &'static str;

enum MoneyWithdrawalResult { Success(Money), InsufficientFunds(Balance(Money)), CardExpired(ExpirationDate), UndisclosedFailure(MoneyWithdrawalError), } ```