Lartu / ldpl

COBOL-like programming language that compiles to C++. With serious dinosaurs with neckties and briefcases 🦕💼
https://www.ldpl-lang.org/
Apache License 2.0
160 stars 24 forks source link

Built in statements to work with CSVs #119

Closed Lartu closed 5 years ago

Lartu commented 5 years ago

@fireasembler has written a wonderful library to read and write to and from CSV files in LDPL. I think it would be wonderful to add statements to the language that mimic these features. Something like:

LOAD CSV <filename> IN <text list> USING DELIMITER <delimiter> AND STRING DELIMITER <string delimiter>

And some sort of WRITE CSV. What do you think?

dgarroDC commented 5 years ago

I'm not sure, I think it's a little too specific thing to add to the language and having that library is enough. :thinking:

arielf212 commented 5 years ago

I agree with @dgarroDC on this one

Lartu commented 5 years ago

I'm not sure, I think it's a little too specific thing to add to the language and having that library is enough. :thinking:

True, but nevertheless people work with CSVs and I think it would be nice to have builtin commands for this. The other thing we could do, though, is start working on a Standard Library :thinking: or making packages for some future package manager.

arielf212 commented 5 years ago

I'd be up for creating a standard library. A packaging system could be great. Do you have a format already in mind or can we make up our own?

Lartu commented 5 years ago

I'd be up for creating a standard library.

Wonderful!

Do you have a format already in mind or can we make up our own?

At the moment, nothing planned. I was just thinking of a tool that would let you lpm get <library name> and that library would be downloaded into your working directory, so you could ldpl -i it. In the future, when we add INCLUDE statements I'd like multi-file libraries to be tar-ed and those libraries would be extracted in its own folder so one could INCLUDE "folder/mainLibraryFile.ldpl" or something like that.