Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > To go with Go or C/C++?

Reply
Thread Tools

To go with Go or C/C++?

 
 
Stefan Ram
Guest
Posts: n/a
 
      05-13-2013
http://www.velocityreviews.com/forums/(E-Mail Removed) (Scott Lurndal) writes:
>>But when you use ::std::vector you are using a
>>template,

>_If_ you use a ::std::vector...


Read my »when you use« in the same way as you read it in:

»... details are useful, but when you use them you need
to ensure that ...«,

»Guidance for Essay Writing and Assessment«,

http://www.pbs.plymouth.ac.uk/teamwe...sayWriting.php

or in:

»But when you use verbs, you can link clauses with ...«,

»Style, Ten Lessons in Clarity and Grace« by
Joseph M. Williams, The University of Chicago.

 
Reply With Quote
 
 
 
 
Jorgen Grahn
Guest
Posts: n/a
 
      05-15-2013
On Mon, 2013-05-13, James Kanze wrote:
> On Sunday, May 12, 2013 9:45:45 PM UTC+1, Paavo Helde wrote:

....
>> My feelings about i18n are mixed. On one hand it would be nice to
>> communicate with the software in my own language. On the other hand the
>> general state of the art seems to be so bad (e.g. half of menu items in
>> broken native language, and half in English) that I almost always switch
>> the interface to English.


My experience too.

>> In my mind, converting some software to a native language should be done
>> well or not done at all. With the kind of software we are making, I
>> cannot see the former happen in the next 30 years, for various reasons.
>> And by then the Google Glasses should be advanced to the Babel Fish level
>> already so there should be nothing to worry about.

>
>> I guess this all depends on the scope of the application. And yes, our
>> software is used in France and China. We are taking care that if someone
>> wants to write filenames or dataset annotations in hieroglyphs he can do
>> so. However, the error messages will still be in English.

>
> This is probably acceptable for some types of technical software
> (e.g. a C++ compiler). For most things, however, you'll want
> a local language interface


It's tricky to talk about "most things" WRT C++. You've worked in
areas where i18n is important; Paavo has worked in areas where it
isn't.

For the record, I'm in Paavo's camp. In ~20 years across many
projects and products, I've never had to deal with this. (And for
hobby projects, since I strongly prefer English user interfaces I have
had no reason to do it there either.)

Bottom line: I am grateful for gcc's format string checker. It has
saved me many times.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
 
 
 
Jorgen Grahn
Guest
Posts: n/a
 
      05-15-2013
On Mon, 2013-05-13, James Kanze wrote:
....
> (The case of
> dates is particularly special: there are a number of
> conventions, which don't respect the usual locales---US military
> uses a different format than civilian use, etc.


You don't even have to go that far. I tried the other day to write a
encoder/decoder for HTTP dates, but discovered that the standard
(POSIX) functions were of no use, since they are locale-sensitive and
also time zone sensitive. There's no way to make strftime() generate
"Sunday" without setting a locale where Sunday is spelled like that.

This kind of thing affects most internet protocols. Probably Boost
has functions which do the right thing, but it seems common for
software to basically implement this from scratch, leap day
calculations and all[1]. Ugh.

/Jorgen

[1] I looked at the popular 'nginx' web server.

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
woodbrian77@gmail.com
Guest
Posts: n/a
 
      05-15-2013
On Wednesday, May 15, 2013 5:17:49 AM UTC-5, Jorgen Grahn wrote:
>
> It's tricky to talk about "most things" WRT C++. You've worked in
>
> areas where i18n is important; Paavo has worked in areas where it
>
> isn't.
>
>
>
> For the record, I'm in Paavo's camp. In ~20 years across many
>
> projects and products, I've never had to deal with this. (And for
>
> hobby projects, since I strongly prefer English user interfaces I have
>
> had no reason to do it there either.)
>
>


I'm with you and Paavo also.


Brian
Ebenezer Enterprises - John 3:16
http://webEbenezer.net
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      05-15-2013
On Wed, 2013-05-15, Paavo Helde wrote:
> Jorgen Grahn <(E-Mail Removed)> wrote in
> news:(E-Mail Removed):
>
>> On Mon, 2013-05-13, James Kanze wrote:
>> ...
>>> (The case of
>>> dates is particularly special: there are a number of
>>> conventions, which don't respect the usual locales---US military
>>> uses a different format than civilian use, etc.

>>
>> You don't even have to go that far. I tried the other day to write a
>> encoder/decoder for HTTP dates, but discovered that the standard
>> (POSIX) functions were of no use, since they are locale-sensitive and
>> also time zone sensitive. There's no way to make strftime() generate
>> "Sunday" without setting a locale where Sunday is spelled like that.
>>
>> This kind of thing affects most internet protocols. Probably Boost
>> has functions which do the right thing, but it seems common for
>> software to basically implement this from scratch, leap day
>> calculations and all[1]. Ugh.

>
> Boost DateTime library is of some help, but extremely hard to use, and


That sounds like the Boost I keep hearing about :-/. I never used any
of Boost myself, partly because I found even the documentation hard to
understand, for the libraries I considered using.

[problems]
> Hopefully it has improved meanwhile, I needed to develop the datetime support some years
> back and haven't looked since.
>
> In some sense this is expected as the topic itself is very hairy [...]


Some of it yes, but some parts are not, and should have a similarly
non-hairy interface.

I was hoping DateTime was all about removing hairiness, and maybe
provide support specifically targeting commonly used areas, such as
Internet mail dates, HTTP dates and "yesterday/a month from now"
calculations.

(And perhaps it does -- I still haven't checked.)

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      05-15-2013
On Wed, 2013-05-15, Paavo Helde wrote:

> One interesting thing what I learned when dealing with dates and times is
> that a day (same date) is nowhere near of 24 hours. Any certain date is
> essentially a string label attached to all local events around the world,
> and the same label is valid for about 48 hours or more, depending on the
> local timezone rules around the international date line. So a date-time
> type or even time_t are not just more exact representations of the date
> type (like double and float), they are very different beasts.


Yes. Discovered this the hard way back in the mid-1990s, when I
represented a date in a file format as the number of seconds since the
AmigaDOS Epoch (1st of January 1980 IIRC, in whatever time zone you
happened to be in). The problems/uncertainties caused by that
decision never quite went away (I still use the file format, 20 years
later).

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Stuart
Guest
Posts: n/a
 
      05-17-2013
On *2013-05-13T12:07+00:00*, James Kanze wrote:
[snip]
> Or just to use ISO format everywhere, but the world isn't
> ready for that yet.)

[snip]

I'm ready, see?

Stuart

PS: I don't know what timezone you live in, so I gave you a +00:00.
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      05-18-2013
On Fri, 2013-05-17, Stuart wrote:
> On *2013-05-13T12:07+00:00*, James Kanze wrote:
> [snip]
> > Or just to use ISO format everywhere, but the world isn't
> > ready for that yet.)

> [snip]
>
> I'm ready, see?


2013-05-13T12:07+00:00

Too bad it's so ugly. The 'T' I mean; I don't mind this at all:

2013-05-13 12:07 +00:00

It seems to be easily avoidable though:

4.3.2 NOTE: By mutual agreement of the partners in information
interchange, the character [T] may be omitted in applications
where there is no risk of confusing a date and time of day
representation with others defined in this International
Standard."
https://en.wikipedia.org/wiki/ISO_8601#cite_note-13

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unicode issue with Python v3.3 Íßêïò Ãêñ33ê Python 80 04-19-2013 07:16 PM
newbie: Problem with $ and \ in strings vivek_12315 Perl Misc 2 04-12-2013 08:30 PM
name lookup failure using metaclasses with unittests Ulrich Eckhardt Python 7 04-12-2013 02:58 PM
Re: print to screen and file with one print statement amiwinter@gmail.com Python 0 04-09-2013 01:31 PM
USBLock : lock/unlock your computer with a USB key Sven Python 0 04-08-2013 03:21 PM



Advertisments