What type of `print` formatting do you prefer?
rempas
rempas at tutanota.com
Wed Dec 22 07:05:47 UTC 2021
On Tuesday, 21 December 2021 at 22:20:52 UTC, russhy wrote:
> no need for the index imo, just ``{}``, and inside you can but
> specifics like mentioned above
>
Like I said. While rare, there will be cases while this will be
useful so I will support it. BUT it will not be necessary to use
and it should not be used for most cases. You and I will use the
simple "{}" syntax ;)
> that's cleaner, easier to read, and easier to write and manage
>
Exactly! That's my point and like I said, it will be easier to
implement manual format with the brackets. I'm still working on
the design of manual formatting tho.
> if someone passes a struct, then you could check if it has a
> function with __traits ``print(void* filep)`` and call it for
> custom prints
>
Yep, supporting methods for Structs was planned anyway! In case
the type is not the basic type then the compiler will check if
the type has a method (I will think about the name) and if it has
it, it will call this method, if not, it will inform the user and
abort compilation
> this is how string interpolation should be done in D
> no need complex things, i like OP's idea, i'd use it (if it
> remains nogc :p)
>
Yes, there will not be a garbage collector now or never!! Libd
(lib's name) will be a low-level (using inline assembly) system
library using the `-betterC` and `--Xcc=-nostdlib` flags to
compile. This will allow us for great runtime performance and
fast compilation times and of course no dependencies!
More information about the Digitalmars-d
mailing list