Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 24 results for
typesafe
- Page 1
Android Native - Typesafe Navigation with Args
Programming
Mobile Development
2 Years Ago
by dimitrilc
…="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> ##
Typesafe
Navigation ## Before diving into navigation type safety, we will first… correct and will not crash, but it is still not
typesafe
. navController.navigate(R.id.action_blankFragment1_to_blankFragment2) Because we have added the…
Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by MattEvans
… it's making my program faster, that I'm still
typesafe
(compiler will spit errors if the precompiler generates insane code…
Re: about reference of a instance in class
Programming
Software Development
16 Years Ago
by vijayan121
… on the paradigm that you want to use: generic programming (
typesafe
): [code=c++]template< typename T > class XX { // ... private…& getYY() { return yy ; } // ... };[/code] object oriented programming (not so
typesafe
): have a base class (say object) which all objects which…
Re: Why can't I use Pointers to point to a Enumurated Constant
Programming
Software Development
19 Years Ago
by cosi
… king I can think of is my research on using
typesafe
languages with security features. ([url]http://www.cs.dartmouth.edu…
Re: precompile directives and const
Programming
Software Development
16 Years Ago
by thekashyap
…, use enums. [code]enum { X = 100 } ;[/code] It's comparatively
typesafe
and doesn't use any memory. Restriction is of course…
Re: functions with variable number of arguments
Programming
Software Development
16 Years Ago
by vijayan121
…: One function -- an infinite (almost) number of types. and completely
typesafe
. > and you don't have to screw around writing…
Re: functions with variable number of arguments
Programming
Software Development
16 Years Ago
by vijayan121
… has a solution. using variadic templates, we can write a
typesafe
function taking an arbitrary number of arguments of arbitrary types…
Re: functions with variable number of arguments
Programming
Software Development
16 Years Ago
by Ancient Dragon
… has a solution. using variadic templates, we can write a
typesafe
function taking an arbitrary number of arguments of arbitrary types…
Re: functions with variable number of arguments
Programming
Software Development
16 Years Ago
by vijayan121
…,double,std::string> >[/B] both of which are
typesafe
. and i would get the same functionality. i also would…
Re: Overloaded Function Help
Programming
Software Development
16 Years Ago
by vijayan121
… same; create different types your code will also be more
typesafe
. [code=cplusplus]#include <iostream> struct temperature { double value…
Re: Reflection
Programming
Software Development
15 Years Ago
by Rashakil Fol
… needs to be constructed -- and it's better and more
typesafe
to pass in a function than something that uses reflection.
Re: Performing Arithmetic operations in Generics in Java
Programming
Software Development
9 Years Ago
by ~s.o.s~
… instanceof checks, it's pretty much impossible to implement a
typesafe
generic adder without "wrapping" the existing `Number` type…
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by ~s.o.s~
As far as virtual functions are concerned, they definately incur some performance overhead, but in normal senarios, the cost and nightmares of maintaining repeatitive code is far more than that when virtual functions are used. The most important point you have to consider while using virtuals is that the [U]binding is done at runtime[/U] as …
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by Ancient Dragon
>>The nature of this application is that it needs to be extremely fast. So shaving nanoseconds is important to a degree. If speed is that important then don't use c++, but use C instead. And code in assembly when needed to optimize some time-consuming algorithms. I don't think virtuals make a program slower, just a little larger. The …
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by MattEvans
> If speed is that important then don't use c++, but use C instead. And code in assembly when needed to optimize some time-consuming algorithms. That could be a possibility at some point; this apps moved from Perl to C++ though; so.. I'm seeing a hell of a speed advantage already ^_- I think writing this heavily object-orientated aspect, in …
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by MattEvans
Hm. I'm finding quite a few situations where the solution is either to make a function that does a process, then pass the results of the process to another function, then pass parts to another function, etc... I'm finding it hard to resist the urge to do one function with include; include, include instead of function, function, function. =P I …
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by MattEvans
Well. After a (very) quick think I'm going to bring those three objects I mentioned to a base class after all. I think; it will make my code alot easier for anyone but me to understand and work with; and I may only need one or two virtual functions in the end.. I will still need some precompile includes; because of the way those mutating/…
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by Ancient Dragon
[QUOTE=MattEvans;323932] I think writing this heavily object-orientated aspect, in assembly, would probably take the rest of my lifetime...[/QUOTE] :eek: No, not the whole blasted program !
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by ~s.o.s~
[quote=MattEvans;323952]s.o.s, Ancient Dragon; thank you for the advice.[/quote] You are welcome. Oh and btw, best of luck with your project...
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by MattEvans
> No, not the whole blasted program ! Mwaha... nah, this is one aspect of the main program; this is the heavily OO aspect, and the part I would certainly [B]least[/B] like to write in any non-OO language... There is a part that's just a linear input parser (by-character).. That might work well in C perhaps. But not today =P > Oh and …
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by thekashyap
>> So shaving nanoseconds is important to a degree. Are virtuals really that bad? Virtual functions [B]will[/B] make a difference at nanosec level. But they improve maintainability many a times over. >> UNTIL they hit certain objects.......type of object You talked abt [I]base class[/I], and [I]type of objects[/I] and [I]certain type …
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by MattEvans
Sorry, that description was a bit ambiguously written. What do you mean exactly by pp? (p)rocedural (p)rogramming? I find that term a bit vague, as all programming is laying out procedure, to a degree. The type of the objects (class of the object) is always known at compile time. Originally I had six functions working with three unrelated …
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by MattEvans
Might be easier to explain with a code example; this is an include file that's definately staying: [code="CPP"] #if defined CALLMODES_CUSP int directive = XFuse::STOIC; if(callmodes_fixed) { for(int i = 0; i < fixed_callmodes.size(); i++) { directive = directive | fixed_callmodes[i]->…
Re: Is this situation a 'bad' use of the precompiler
Programming
Software Development
17 Years Ago
by thekashyap
>>....are all now inherited from the base Descriptor.... Well in teh end I would say you made a good choice.. :) [B] pp = pre-processor[/B] (same as what you refer as pre-compiler). I called it pp because in C compiler that I used, the executable that used to perform pre-processing/compilation was named 'pp'. Me>> ....If this is the …
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC