2

The result is transparently converted to another data type.

What does "transparently" mean in this context?

1
  • This question has absolutely nothing, whatsoever, to do with English. It's about casting in computer science. there is utterly no connection, whatsoever, in any way, to English.
    – Fattie
    Commented Jul 6, 2011 at 21:23

4 Answers 4

12

I suspect you are talking about programming, but correct me if that is not the case. I also suspect you mean "data type" and not "date type" but I could be wrong there as well.

If something in a coding language is "transparently converted to another dat[a] type" it means it is converted invisibly, without giving any sign that it is doing so. This is one reason why some people have a hard time debugging Javascript, because transparent conversions (also known as "coercions") won't get flagged in a debugger because they are not, strictly speaking, bugs (although Douglas Crockford might have a different opinion about that).

For example, in Javascript, if you write

if (3 == "3") {
  alert("String '3' does equal the number 3");
}

you can see that the language has transparently converted one of the data types into another. (To force Javascript to perform an exact comparison without the transparent conversion, you would have to write if (3 === "3") ).

6
  • 1
    That is exactly correct ... it is something that happens in many programming languages, but most often in those that are not "strongly typed", that is, where you do not declare the type of a variable. It's a double-edged sword, IMO; in some ways it allows for more robust applications - in others it allows for bugs that are not always obvious to track down.
    – Will
    Commented Feb 12, 2011 at 13:37
  • @Will: you're confusing "strongly typed" with "statically typed". Commented Feb 12, 2011 at 17:45
  • 4
    @jae: Actually, he's confusing it with "explicitly typed". It's perfectly possible to have a statically typed language in which no type declarations are required (statically typed functional languages are typically of this form). None of these are really consistently defined terms though, so opinions vary. Commented Feb 12, 2011 at 20:02
  • @John Bartholomew: that was what I meant, just couldn't think of the term. Brain cramps every now and again.
    – Will
    Commented Feb 13, 2011 at 21:48
  • 3
    @Joe: "Totally, utterly, completely irrelevant..."? That's a bold statement. The question is about the meaning of words in a context. That's fair game here.
    – Robusto
    Commented Jul 6, 2011 at 22:20
5

It means the conversion is invisible, unnoticable. Like people bumping into a glass door, being so transparent as to be (nearly, depending on the lighting) invisible.

2
  • 1
    +1 for being the only Answer that sticks to the meaning of transparently, without using it as an excuse to spout on about the details of how such conversion might be internally implemented in a computer context. And for being correct, of course! :) Commented Jul 7, 2011 at 0:22
  • +1 For people bumping into glass doors, considering that's the kind of effect transparent type conversions can have sometimes (if it's the wrong conversion).
    – Pharap
    Commented Oct 4, 2014 at 5:05
5

In the context of computers transparency is one of three seemingly identical concepts. Think about them this way:

  • real: it's there and you can see it
  • virtual: it's not there but you can see it
  • transparent: it's there but you can't see it

A transparent conversion is thus one that is happening but you can't see it. It's not explicit.

5

In programming context, transparently means without the programmer writes code to do it.

For example, in the following PHP code

$value = 1;

if ($value) {
  // …
}

the content of $value is automatically (or transparently) converted to a boolean value. In other programming languages, the programmer should explicitly convert the value, writing code similar to the following:

value = 1;

if ((boolean) value) {
  // … 
}

One of the meaning of transparent reported by the NOAD is the following:

(computing; of a process or interface) functioning without the user being aware of its presence.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .