Everything2
Near Matches
Ignore Exact
Full Text
Everything2

::

created by muegge

(thing) by muegge (3.7 y) (print)   ?   I like it! Sat Jul 01 2000 at 7:07:05

The scoping operator used in many object oriented, or OO programming languages to specify what class, object (and/or namespace in c++) a function or variable belongs to. If you see the following code:

	std::cout

This would tell you that the output stream instance cout belonged to the namespace std.


And for those of you giggling over "std" in the peanut gallery, maybe you can share what's so funny with us coders? :)

18.09.01: Thanks to Wicker808 for the factual corrections!


(thing) by jakohn (3.6 wk) (print)   ?   I like it! Sun Jul 02 2000 at 21:20:10

In Haskell, the :: operator stands for "has type", and is used in the type signatures of functions. For example, the signature of length looks like this:
length :: [a] -> Integer
This specifies that the function "length" has type: "map a list of type a onto an integer"; that is, it takes a list of a generic type (call it 'a') and returns an integer.

(thing) by ryano (1.4 mon) (print)   ?   I like it! Sun Jul 02 2000 at 21:35:18

A lesser-known smiley or emoticon, which represents a person flaring his/her nostrils very wide, while keeping his/her mouth very tightly closed. Rarely used, as nobody is sure what emotion it is supposed to signify.

(thing) by bitter_engineer (6.3 y) (print)   ?   I like it! Sun Jul 02 2000 at 21:42:15

Also a symbol that means 'has a similar relationship to'. This usage is almost always found on the SATs and other standardized tests.

Example:

fish:water::worm:?

  1. bird
  2. earth
  3. dog
  4. sidewalk

(thing) by ClockworkGrue (6.9 mon) (print)   ?   1 C! I like it! Wed May 30 2001 at 3:45:39

Many years ago, in chatrooms, double-colons were used to set off actions, as opposed to things you were saying. Actions were written in third-person.

Example:
::smiles::
::opens his backpack and pulls out a small lantern::
::hugs LadyFyr497::

The first place I ever encountered double-colons was in AOL's Red Dragon Inn, back in 1995 or so, when I first got a modem. I still use them in chatrooms today, well, except ones that recognize /me. Maybe I'm just a sucker for mid-to-late 90's alternative culture.

Easily much classier than emoticons.

One more example of forgotten netiquette.


(thing) by mricicle (8 mon) (print)   ?   I like it! Wed May 30 2001 at 14:48:40

In SML, :: is called "cons", and is the infix operator for adding an element at the front of a list. For example, 5::[6,7] results in the list [5,6,7].

:: is right associative, so the expression 1::2::3::nil makes sense and means 1::(2::(3::nil)).

When performing pattern matching, :: is used to decompose a list into the first element (the head) and the rest of the list (the tail). Here is a small function that returns the sum of all elements in a list:

fun sum [] = 0
 |  sum (x::xs) = x + sum xs;

If x::xs is matched with a list then x is the first element in the list, and xs the rest of the list.


(thing) by quantumlemur (1.3 mon) (print)   ?   I like it! Wed Mar 24 2004 at 20:01:57

:: is used on the HP 48 series and HP 49 series calculators as the opening mark for a "secondary object", which is closed with ;. Secondaries are usually used to group a number of commands and functions for a SystemRPL program, but can be used to hold any other objects together as well, like a list (which on the calculator is delimited by { and }). Lists and secondaries are both examples of composite objects, and thus share many commands on the calculator. The :: and ; are similar to { and } in C, Java, and quite a few other languages.


printable version
chaos

(%-= Best Death Ever STD How to make a decent cup of tea
Operator overloading Netiquette /me Haskell
OO C++ Calvin and Hobbes Final Fantasy: Crystal Chronicles
C++: computing Fibonacci numbers at compile time nil SML cons
Theatrical superstitions SystemRPL HP 49G /dev/null
cromulent Window Class Library Emoticon !!
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Drink up!
A Song in Itself
Surgeon
How do men touch you?
The Marty McKolskey Incident
If an Agent Knocks - Federal Investigators and Your Rights
Body language
Oranges & Lemons
Operation Praying Mantis
The war party
Finger picking
Battle of Trafalgar
Ankle sprain
schizophrenia
New Writeups
Adaptive Child
Annie's garden salsa(recipe)
Simulacron3
Zig-Zag(thing)
Ouzo
questions(idea)
Ouzo
Special Grilled Cheese(fiction)
Noung
Tiananmen Square Massacre(idea)
aneurin
Lord St Clair(person)
artman2003
Assholes and Douchebags: A Comparison(person)
locke baron
Tyan Thunder K8WE(thing)
locke baron
Udaloy class destroyer(thing)
Scaevola
Same-sex marriage(idea)
SteveMurrayFromNZ
British Standard Handful(idea)
nailbiter
nerve stapling(thing)
locke baron
Multiple Myeloma(thing)
SubSane
blonde, freckles, skinny, short(person)
arcanamundi
A Ruba'iyat for May(person)
Everything 2 is brought to you by the letter C and The Everything Development Company