473,803 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

syntax suggestion for concepts

Would the fear factor for concepts be slightly reduced if,
instead of:

concept C<typename T>
{
typename T::S;
int T::mem();
int nonmem();
};

a new usage of :: was added to make concepts/
concept maps more consistent with class interfaces:

concept C<typename T>
{
typename S
int mem();
int ::nonmem();
};

A perhaps bad aspect of this is that multi-type
concepts could ONLY specify names prefixed with ::,
that is, this under the existing proposal:

concept D<typename U, typename V>
{
int U::umem();
int uandv(U u, V v);
};

would have to be changed to something like:

concept DD<typename U>
{
int umem();
};
concept D<typename U, typename V: DD<U>
{
int ::uandv();
};

(Or, the one reserve word "concept" could be
replaced with two: "algebra" for single-type
concepts, and "geometry" for multi-type
concepts. This would avoid the ubiquitous
:: in geometries.)

For orthogonality, this use of :: could be allowed in
class interfaces as well. Concepts and class interfaces
are both ways of describing type usage, so it seems
more intuitive to me that they be as similar as
possible.

Feb 25 '07
20 2600
On Mar 6, 11:10 pm, "jam" <farid.mehr...@ gmail.comwrote:
Do you mean that refinement syntax is not orignated from that of
inheritance and will not confuse every one?
The refinement syntax is identical to the inheritance syntax. I
haven't seen any indication that this choice causes confusion. Rather,
once the audience has grasped the notion of concepts, it becomes
obvious what "inheritanc e" of concepts means, so I find the syntactic
equivalence to help.

With every feature, it's a judgement call whether to reuse syntax from
a similar feature or invent something new. We've tested most of these
decisions on various audiences, and we're pretty sure we have the
balance just about right.
- It again mixes object-oriented and generic programming ideas in a
way that will lead to confusion. I guarantee that, after showing an
example like the above to an audience, I will get two questions: (1)
why can't I just use ':' to inherit from C? and (2) can I declare a
variable of type C*? Neither question would arise without the
assumption that concepts are just another take on object-oriented
programming (they aren't), and we need to be very careful not to give
the impression that they are.

enerything has a price .For innovation yuo have to be braver than
this. Is the fear that programers might misunderstand a reason for us
not to do anything?.
No, the fear that programmers might misunderstand is a reason to
select one of several alternatives. In the case of the above, there is
already a way to say that a particular type meets the requirements of
a specific concept: it's called a concept map. It's more powerful and
more general than the alternative proposed above, and it also avoids
misunderstandin g by not mimicking a different feature with different
limitations.
but there exists one reason for not using concept keyword in that
manor (if I am not mistaken) :concepts allow use of a type when
afeature is available and accesible and ban otherwise but what we need
here is that we want to remind ourselves not to forget to provide a
specific interface for a class currently declared but not defined.I
suggest the 'interface' keyword syntax similar to that of 'concept'
for this porpuse that unlike JAVA will not necessarily mean a runtime
polymorphism.I would like to wrote:

interface CC<typename T>{
public:
T(T&);
private:
void go();
virtual void gogo();

};

CC struct my_type{
/*definition of following functons is a must now and copy-ctor must
not be banned(private or protected).
private: void go();
private: virtual void gogo();
*/

};
Concepts do exactly what you want, but with a slightly different
syntax:

concept CC<typename T>{
T::T(T&);
void T::go();
virtual void T::gogo();
}

struct my_type {
my_type(my_type &);
void go();
private:
virtual void gogo();
};

concept_map CC<my_type{
} // error: my_type::gogo is private!

Concept maps do three things:
(1) Specify that a set of types (in this case, just my_type) meet
the requirements of a concept (here, CC).
(2) Show how those types meet the requirements of a concept
(although we didn't do so here)
(3) Ask the compiler to verify that all of the requirements of the
concept are, in fact, met (my_type doesn't meet the requirement for
"gogo", so the concept map is ill-formed).

Cheers,
Doug

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 7 '07 #11
On Mar 6, 11:09 pm, "W Karas" <wka...@yahoo.c omwrote:
I feel what you are saying here can be summarized as: When using
templates, names are bound to specific types at compile time. When
using OO, names may not be bound to specific types until runtime.
Unsurprisingly, any binding errors will occur when the binding occurs.
Yes, although I'd rephrase the template part slightly. Names are bound
to specific types or type *parameters* at compile time. Looking back
at a Shape concept...

concept Shape<typename T{
bool isEqual(T, T);
}

We don't need to know what T is to know that isEqual takes two T's of
exactly the same type, whereas with a Shape interface (again, Java)...

interface Shape {
boolean isEqual(Shape);
}

We can't express that isEqual only accepts another shape of the same
exact type, be it a Triangle or a Square, because we don't have a
stand-in for the real type of 'this'. Note that some object-oriented
languages do have a "self" type that stands in for the real type of
"this", to overcome this particular instance of the problem.
Late binding is generally bad for performance and (I and probably you
and others would agree) for understandabili ty. But it's more
flexible.
Generic algorithms meant for heterogeneous types work better with late
bindings, a benefit which is the mirror image of the "problem" you
show above.
The reason I called out type parameters above is because late-binding
does not have to be a difference. One can compile type-parameterized
functions separately, using late binding to execute them. In this
case, even though we might not know what a type parameter 'T' will be
at run time, we still know what functions we can apply to 'T', e.g.,
we can call isEqual with two T's. For example, generic functions in
Haskell using "type classes"---which closely resemble concepts---are
separately compiled, as is Jeremy Siek's language 'G'. G's design was
the basis of concepts in C++, and provides almost the same feature
set.
Another way to address multiple dispatch in a way more similar to
C++ OO is to think of the function as a "member" of an implied
class that is the tuple of the types of the function parameters.
Yes. This is typically called "dictionary passing", and is the
implementation technique used by both Haskell and G.
In a sense, this is the same way that C++ concepts are implemented,
but the dictionary is passed at compile time, not run time.
Is ultimately the key difference between GP and OO the fact
that member functions are central to OO but not to GP? To
me, member functions seem more central to encapsulation than
polymorphism.
One of the typical Generic Programming complaints about OO is that it
ties together the questions of "What can this type do?" and "How is
this type implemented?" into the same language mechanism: inheritance.
The first question is the more important question for someone writing
a polymorphic algorithm, because we don't care what the type is... we
just want to be sure that it will work with our algorithm. So, GP only
concerns itself with this first question: A concept describes what a
certain type needs to be able to do to work inside a polymorphic
algorithm. A concept map tells *how* a particular type meets the
requirements of a concept, allowing us to smooth over syntactic
differences and tie together independely-developed pieces.
It seems easy to conceive of a programming
language with runtime polymorphism but no membership, where
vptrs are passed as hidden function paramaters rather than
being hidden object data members. With this approach,
multiple dispatch becomes easy -- there is a vptr hidden
parameter for each "polymorphi c type tuple" rather than
just for each polymorphic type.
Exactly!

Cheers,
Doug

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 7 '07 #12
Douglas Gregor wrote:
On Mar 6, 11:09 pm, "W Karas" <wka...@yahoo.c omwrote:
>Another way to address multiple dispatch in a way more similar to
C++ OO is to think of the function as a "member" of an implied
class that is the tuple of the types of the function parameters.

Yes. This is typically called "dictionary passing", and is the
implementation technique used by both Haskell and G.
In a sense, this is the same way that C++ concepts are implemented,
but the dictionary is passed at compile time, not run time.
Interestingly, would we call it "generic programming" or whatever, it
is still implemented with an OO programming, as OO is the most generic
programming style :)
>
>Is ultimately the key difference between GP and OO the fact
that member functions are central to OO but not to GP? To
me, member functions seem more central to encapsulation than
polymorphism .

One of the typical Generic Programming complaints about OO is that it
ties together the questions of "What can this type do?" and "How is
this type implemented?" into the same language mechanism: inheritance.
Yes. And we have a notion of "interface" that doesn't deal with
implementation, and a "mixin class" that is implementation-only.
The first question is the more important question for someone writing
a polymorphic algorithm, because we don't care what the type is...
In OO programming, we also able to forget about the exact type, we can
just work with its "interface" .
we
just want to be sure that it will work with our algorithm. So, GP only
concerns itself with this first question: A concept describes what a
certain type needs to be able to do to work inside a polymorphic
algorithm. A concept map tells *how* a particular type meets the
requirements of a concept, allowing us to smooth over syntactic
differences and tie together independely-developed pieces.
>It seems easy to conceive of a programming
language with runtime polymorphism but no membership, where
vptrs are passed as hidden function paramaters rather than
being hidden object data members. With this approach,
multiple dispatch becomes easy -- there is a vptr hidden
parameter for each "polymorphi c type tuple" rather than
just for each polymorphic type.

Exactly!
I would have to recall the same solution mentioned in D&E 13.8
(Stroustrup says the idea was suggested by Doug Lea in 1991):

bool intersect(virtu al const Shape& , virtual const Shape& );

Was it the syntax for what you call a "parametric polymorphism"?
If yes, then I would say that multimethods problem are unrelated
to concepts proposal. Well, it might be convenient to introduce both
"concepts" and "parametric polymorphism" at once as a single unit,
but they are unrelated to each other and can be introduced separately.

In fact, if we would have the above syntax in 1991, we can now write:

class Shape {
public:
virtual bool isEqual(virtual const Shape& ) const = 0;
};

That could mean that "polymorphi c tuple" passed as hidden parameter
or whatever: that was the problem that needs to be solved when we
discuss multimethods. That is a separate problem.

To this very time, there is no noticeable differences between the
OO interfaces and GP concepts, how you describe them.
--
Andrei Polushin

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 7 '07 #13
On Mar 7, 3:59 pm, "Andrei Polushin" <polus...@gmail .comwrote:
Douglas Gregor wrote:
Yes. This is typically called "dictionary passing", and is the
implementation technique used by both Haskell and G.
In a sense, this is the same way that C++ concepts are implemented,
but the dictionary is passed at compile time, not run time.

Interestingly, would we call it "generic programming" or whatever, it
is still implemented with an OO programming, as OO is the most generic
programming style :)
By this logic, spaghetti code is the most generic programming style :)

What's OO turn implemented with? Procedural Programming.
What's Procedural Programming implemented with? Unstructured
Programming.
What's Unstructured Programming? Spaghetti!

On a more serious note, one can implement run-time dispatched GP code
using OO techniques, but the objects themselves essentially become
meaningless... th7re used only for the dynamic dispatching present in
their vtables, essentially just a bucket of function pointers. It's
not a very enlightened use of OO, but if OO is all you have to build
on...
One of the typical Generic Programming complaints about OO is that it
ties together the questions of "What can this type do?" and "How is
this type implemented?" into the same language mechanism: inheritance.

Yes. And we have a notion of "interface" that doesn't deal with
implementation, and a "mixin class" that is implementation-only.
Yes, mixins were mentioned in the blurb I linked to originally

http://www.generic-programming.org/f...ed-programming

because they do address part of the problem.

Mixins still tie the questions "What can this type do?" and "How is
this type implemented?" together. Yes, they can be mixed in after the
type is created (and that's good!), but they still answer both
questions with the same answer, inheritance. Here's an example where
this begins to get in the way:

interface Shape {
void draw();
}

interface Gunslinger {
void draw();
}

Now, I want to have a class YosemiteSam (a gun-toting cartoontoon
character):

class YosemiteSam { ... }

YosemiteSam is a shape, so we want to mix-in a subclass that makes
YosemiteSam implement Shape:

mixin class YosemiteSamAsSh ape implements Shape {
void draw() { /* see http://en.wikipedia.org/wiki/Yosemite_Sam
*/ }
}
// mix that into YosemiteSam, of course

Then we want YosemiteSam to be a Gunslinger, so he can participate in
the WildWildWest:

mixin class YosemiteSamAsGu nslinger implements Gunslinger {
void draw() { /* pull out both of his pistols at once */ }
}
// mix that into YosemiteSam, of course

Now we have a YosemiteSam that inherits the mixins YosemiteSameAsS hape
and YosemiteSamAsGu nslinger, and therefore implements both the Shape
and Gunslinger interfaces. Do those interfaces each get the right
"draw" methods? If so, how are the mixins arranged to ensure that this
happens? If not, we've run into a problem with expressing everything
in terms of inheritance, because different mixins for completely
different purposes have now collided in the same class.

With Generic Programming, there is no such collision because the
various different ways of viewing YosemiteSam---as a Shape or as a
Gunslinger---are kept completely separate, in different concept maps:

concept_mappe<Y osemiteSam{ void draw() { ... } }
concept_map Gunslinger<Yose miteSam{ void draw() { ... } }

Those draw() functions (not "methods") live in the concept map, not in
YosemiteSam. So the implementation of YosemiteSam is completely opaque
to all but the author. Generic/polymorphic functions only see the view
of YosemiteSam that they've asked for, e.g., as a Shape or as a
Gunslinger.
The first question is the more important question for someone writing
a polymorphic algorithm, because we don't care what the type is...

In OO programming, we also able to forget about the exact type, we can
just work with its "interface" .
Right, but now you're working with two objects known only by their
common interface, say, Shape, and you have no idea whether those two
objects have the same actual type or are completely different, because
you've thrown away valuable type information. This is, again, the
binary method problem. Well-known, well-studied, and the typical
answers are either multi-methods or a "self" type.
I would have to recall the same solution mentioned in D&E 13.8
(Stroustrup says the idea was suggested by Doug Lea in 1991):

bool intersect(virtu al const Shape& , virtual const Shape& );
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 8 '07 #14
On Mar 8, 1:40 pm, "Douglas Gregor" <doug.gre...@gm ail.comwrote:
..
On a more serious note, one can implement run-time dispatched GP code
using OO techniques, but the objects themselves essentially become
meaningless... th7re used only for the dynamic dispatching present in
their vtables, essentially just a bucket of function pointers. It's
not a very enlightened use of OO, but if OO is all you have to build
on...
..

In languages like SmallTalk, which have names that can be bound
to any member function before being bound to a type, you can
write generic algorithms that only deal with one unbound type.
Having just one unbound type insures that multiple dispatch
is not required.

In SmallTalk, I can implement naturally any template with
one type parameter (that doesn't derive new types from the
type paramter, or where the derivation is only done to
take advantage of the empty member optimization). That's
a big limitation, but it seems to me that the most commonly
used templates in the STL have only one type parameter.
The exception is map<>, but that is a case where no multiple
dispatch is needed even though there are two type parameters.
The SmallTalk version of map<would have the advantage of
being a heterogenous rather than homogeneous container.

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 8 '07 #15
Concepts do exactly what you want, but with a slightly different
syntax:

concept CC<typename T>{
T::T(T&);
void T::go();
virtual void T::gogo();
}

struct my_type {
my_type(my_type &);
void go();
private:
virtual void gogo();
};

concept_map CC<my_type{
} // error: my_type::gogo is private!

Concept maps do three things:
(1) Specify that a set of types (in this case, just my_type) meet
the requirements of a concept (here, CC).
(2) Show how those types meet the requirements of a concept
(although we didn't do so here)
(3) Ask the compiler to verify that all of the requirements of the
concept are, in fact, met (my_type doesn't meet the requirement for
"gogo", so the concept map is ill-formed).
That is not what I meant.I wrote that we need some construct to
specify part of a class`s interface in an exact manor(including access
specifiers) before the type is defined.I guess that cocepts generate
problems with access rules for example dose this compile?:

concept C<typename T>{
void T::go();
};

template <C T>struct A{};

class B{
protected:
void go();
void use(){
A<Ba;//right? void go() is accessible here.
};
};


---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 9 '07 #16

on Thu Mar 08 2007, "W Karas" <wkaras-AT-yahoo.comwrote:
In SmallTalk, I can implement naturally any template with
one type parameter (that doesn't derive new types from the
type paramter, or where the derivation is only done to
take advantage of the empty member optimization). That's
a big limitation, but it seems to me that the most commonly
used templates in the STL have only one type parameter.
The exception is map<>, but that is a case where no multiple
dispatch is needed even though there are two type parameters.
You're focusing on class templates, which in STL are a bit of a
distraction from its essential Generic Programming stuff: the
algorithms (and concepts). When looking at the STL through a Generic
Programming lens, containers are best viewed as examples of some of
the concepts... and not very strong concepts at that! (see item 2 of
http://tinyurl.com/34o9ks : http://tinyurl.com/39jpfh)

If you look at the algorithms you'll find that nearly all of them have
more than one template parameter.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 19 '07 #17
On Mar 19, 2:50 pm, d...@boost-consulting.com (David Abrahams) wrote:
on Thu Mar 08 2007, "W Karas" <wkaras-AT-yahoo.comwrote:
In SmallTalk, I can implement naturally any template with
one type parameter (that doesn't derive new types from the
type paramter, or where the derivation is only done to
take advantage of the empty member optimization). That's
a big limitation, but it seems to me that the most commonly
used templates in the STL have only one type parameter.
The exception is map<>, but that is a case where no multiple
dispatch is needed even though there are two type parameters.

You're focusing on class templates, which in STL are a bit of a
distraction from its essential Generic Programming stuff: the
algorithms (and concepts). When looking at the STL through a Generic
Programming lens, containers are best viewed as examples of some of
the concepts... and not very strong concepts at that! (see item 2 ofhttp://tinyurl.com/34o9ks:http://tinyurl.com/39jpfh)

If you look at the algorithms you'll find that nearly all of them have
more than one template parameter.
You have a point, but I don't think that fully refutes my argument.

If you look at an algorithm like find, yes, it does have two
type parameters. But the only possible multiple dispatch case
is the call to operator != (RT a, T b) where RT is the return
type of the iterator's 'operator *' and T is the type of the
sought value. I would guess that, in the great majority
of situations where 'find' is used, T is the same as RT, or
an instance of T implicitly converts to RT, so there is no
true multiple dispatch.

Maybe multiple dispatch does occur frequently when using
templates. But if GP is just OO with
multiple dispatch and earlier bindings, that doesn't justify
viewing GP and OO as being in some huge all-important
cage-match dichotomy in my opinion.

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 20 '07 #18

on Tue Mar 20 2007, "W Karas" <wkaras-AT-yahoo.comwrote:
On Mar 19, 2:50 pm, d...@boost-consulting.com (David Abrahams) wrote:
>on Thu Mar 08 2007, "W Karas" <wkaras-AT-yahoo.comwrote:
it seems to me that the most commonly used templates in the STL
have only one type parameter. The exception is map<>, but that
is a case where no multiple dispatch is needed even though there
are two type parameters.

You're focusing on class templates, which in STL are a bit of a
distraction from its essential Generic Programming stuff: the
algorithms (and concepts). When looking at the STL through a Generic
Programming lens, containers are best viewed as examples of some of
the concepts... and not very strong concepts at that! (see item 2 ofhttp://tinyurl.com/34o9ks:http://tinyurl.com/39jpfh)

If you look at the algorithms you'll find that nearly all of them have
more than one template parameter.

You have a point, but I don't think that fully refutes my argument.

If you look at an algorithm like find, yes, it does have two
type parameters. But the only possible multiple dispatch case
is the call to operator != (RT a, T b) where RT is the return
type of the iterator's 'operator *' and T is the type of the
sought value. I would guess that, in the great majority
of situations where 'find' is used, T is the same as RT, or
an instance of T implicitly converts to RT, so there is no
true multiple dispatch.
I don't really see what that proves. T is not always the same as RT.
And then there's find_if, transform, accumulate, lower_bound, and a
whole slew of other algorithms with more complicated type
relationships.
Maybe multiple dispatch does occur frequently when using
templates. But if GP is just OO with multiple dispatch and earlier
bindings,
It isn't. Did somebody claim it was?
that doesn't justify viewing GP and OO as being in some
huge all-important cage-match dichotomy in my opinion.
Whoosh! That went right over my head; I have no clue what you're
trying to say here.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 20 '07 #19
On Mar 6, 1:41 pm, grizl...@yandex .ru ("Grizlyk") wrote:
Where can one easy learn concept syntax and semantics?
The "Learning Concepts" section at the bottom of the following page
has some pointers:

http://www.generic-programming.org/l...es/conceptcpp/

Cheers,
Doug

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Mar 21 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
34274
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
12
1544
by: Steven Bethard | last post by:
The poll, as stated, asked voters to vote for the syntax suggestion they liked the /most/. Some of the conclusions people are trying to draw from it are what syntaxes people liked the /least/. This is probably not the right conclusion to be drawing from the poll that was given. It is, however, the kind of conclusion I think we'd like to draw. I'm not sure we're going to agree fully on a single "best" proposal, but it would help to...
29
2477
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules" for when and how to use single quotes and double quotes in ASP? thanks! ---------------------- SQL = SQL & "WHERE '" & REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE("GenKTitles.
23
2542
by: Carter Smith | last post by:
http://www.icarusindie.com/Literature/ebooks/ Rather than advocating wasting money on expensive books for beginners, here's my collection of ebooks that have been made freely available on-line by their authors. There are lots of them out there but this selection cuts out the junk. If you know of any other good books that are freely available please post a link to them here and I'll consider adding them to the site.
18
2951
by: robert | last post by:
Using global variables in Python often raises chaos. Other languages use a clear prefix for globals. * you forget to declare a global * or you declare a global too much or in conflict * you have a local identical variable name and want to save/load it to/from the global with same name * while you add code, the definition of globals moves more and more apart from their use cases -> weirdness; programmers thinking is fragmented * using...
13
3038
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format for accessing objects, controls, etc. in VB/Access2003. In particular where will I find explanations of:- Actions, Functions, Methods, Properties - I'm understand the
17
1895
by: Howard Gardner | last post by:
/* If I am using boost, then how should I write this program? As it sits, this program is using SFINAE to determine whether or not a type supports particular syntax. I suspect that there is functionality in boost to do this. I have found mpl::has_xxx, which I suspect of being part of the solution. I've also found type_traits::has_nothrow_constructor
4
10746
by: FM | last post by:
Hi there: My question is about checking my sql-syntax against DB2UDB V9 throug JDBC 2.0 Is there a way to check my syntax,for example "select * from T1"? Thank you for your help. Regards,
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10292
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.