== Quote from Don (nos...@nospam.com)'s article
> Jeremie Pelletier wrote:
> > Christopher Wright wrote:
> >> Jeremie Pelletier wrote:
> >>> Me neither, in fact I would *love* to see a -nrtti switch in DMD to
> >>> disable the generation of all ClassInfo and TypeInfo instances, along
> >>> with a v
>If you want me to list something that's a little evil, is the automatic silent
>cast from an integral to its unsigned version. I'd like to disallow such
>silent cast in D (maybe C# does the same).<
We may even disallow all implicit conversions that lose a significant amount of
information:
do
Jeremie Pelletier wrote:
bearophile wrote:
Don:
I've often thought that a pragma for a module to "don't generate
module info" would be very useful for executable size.
Do you use the LDC compiler?
LDC has the pragmas:
pragma(no_typeinfo): You can use this pragma to stop typeinfo from
being
Jeremie Pelletier:
> However we're
> talking systems programming here, people want the choice between using
> the feature or not using it :)
We aren't talking about a feature here, but a standard syntax to denote class
attributes. And D being a system language has nothing to do with being free
Kagamin:
> > I'm for the removal of size_t from everywhere it's not stricly necessary
> > (so for example from array lenghts) to avoid bugs.
>
> Yess, unsigneds are evil. They must go to the camp of gotos and unsafe
> pointers.
In D it's better to not use them when you want a strictly positive
Jeremie Pelletier:
> I would much prefer these to be compiler switches, so you can make them
> global with very little effort.
Compiler switches are a blunt tool. So I think module-wide switches are better.
Bye,
bearophile
bearophile wrote:
Don:
I've often thought that a pragma for a module to "don't generate module
info" would be very useful for executable size.
Do you use the LDC compiler?
LDC has the pragmas:
pragma(no_typeinfo): You can use this pragma to stop typeinfo from being
implicitly generated for
Kagamin Wrote:
> In fact DMD has bug here: spec says, this pointer must not be taken
> implicitly or explicitly, yet dmd allows calling virtual methods on the
> object being constructed.
A... I've misread the spec a little. Though I think, it's still a problem that
constructor allows to call v
bearophile Wrote:
> >Function Parameter Ordering: When defining a function, parameter order is:
> >inputs, then outputs.<
>
> D may even enforce this, allowing "out" only after "in" arguments.
I'm trying to do the reverse. Maybe I used fprintf and sprintf too much.
> >Static and Global Variabl
Don:
> I've often thought that a pragma for a module to "don't generate module
> info" would be very useful for executable size.
Do you use the LDC compiler?
LDC has the pragmas:
pragma(no_typeinfo): You can use this pragma to stop typeinfo from being
implicitly generated for a declaration.
p
Jeremie Pelletier wrote:
Christopher Wright wrote:
Jeremie Pelletier wrote:
Me neither, in fact I would *love* to see a -nrtti switch in DMD to
disable the generation of all ClassInfo and TypeInfo instances, along
with a version identifier, maybe "version = RTTI_Disabled;" to let
code handle
Justin Johansson:
> The return type must be specified however,
> since inference cannot be made from missing information.
If the information isn't missing in D2 you can sometimes use "auto" return type
for function templates and some functions, and in some other situations you can
also use type
Jérôme M. Berger Wrote:
> bearophile wrote:
> > I have found this page linked from Reddit (click "Toggle all summaries" at
> > the top to read the full page):
> > http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
> >
> > At Google C++ isn't the most used language, so it may be bet
bearophile wrote:
I have found this page linked from Reddit (click "Toggle all summaries" at the
top to read the full page):
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
At Google C++ isn't the most used language, so it may be better to use a C++
style guide from a firm that
Christopher Wright wrote:
Jeremie Pelletier wrote:
Me neither, in fact I would *love* to see a -nrtti switch in DMD to
disable the generation of all ClassInfo and TypeInfo instances, along
with a version identifier, maybe "version = RTTI_Disabled;" to let
code handle it.
I use RTTI a lot for
> >Function Parameter Ordering: When defining a function, parameter order is:
inputs, then outputs.<
> D may even enforce this, allowing "out" only after "in" arguments.
> ---
Function Default Arguments
void foo(int x, int y = 3)
{
...
}
...
foo(4); // same as foo(4, 3)
Jeremie Pelletier wrote:
Me neither, in fact I would *love* to see a -nrtti switch in DMD to
disable the generation of all ClassInfo and TypeInfo instances, along
with a version identifier, maybe "version = RTTI_Disabled;" to let code
handle it.
I use RTTI a lot for simple debugging like prin
bearophile wrote:
Jeremie Pelletier:
I think these are more programming guidelines than language design rules.<
Yes, of course. But programming guidelines can give possible ideas to a
language designer, because:
- if everyone is encouraged to follow a certain idiom to avoid bugs, it may be
Jeremie Pelletier:
>I think these are more programming guidelines than language design rules.<
Yes, of course. But programming guidelines can give possible ideas to a
language designer, because:
- if everyone is encouraged to follow a certain idiom to avoid bugs, it may be
good to let the langu
bearophile wrote:
I have found this page linked from Reddit (click "Toggle all summaries" at the
top to read the full page):
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
At Google C++ isn't the most used language, so it may be better to use a C++
style guide from a firm that
bearophile Wrote:
> >Regular Functions: Functions should start with a capital letter and have a
> >capital letter for each new word. No underscores:<
>
> That's ugly.
Coming from a career in acronym-city (aerospace), project management mandated
that use of acronyms
in identifiers MUST be clear
I have found this page linked from Reddit (click "Toggle all summaries" at the
top to read the full page):
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
At Google C++ isn't the most used language, so it may be better to use a C++
style guide from a firm that uses C++ more than G
22 matches
Mail list logo